The Web application allows only up to 5 sessions, from the sixth it breaks

The Web application allows only up to 5 sessions, from the sixth it breaks.

When I open five tabs in the browser it works. from the sixth it falls.

Im Use Xojo 2022r3

In Web 1.0 I don’t have this limitation

1 Like

I’ve reported problems where sessions never close properly: #69982 I wonder if this is related to what you are seeing?

@Ricardo_Cruz mentioned seeing a (related?) issue when using multiple tabs.

I have applications running on the web (web 1.0) that have more than 20 simultaneous users and the sessions are usually closed automatically. In the new API, the sixth open session shows a blank page and the application freezes. But when I close the sixth window or tab, it works again.

Does this also happens with simpler projects? Are you also trying opening connections with different computers or is it everything in the same browser window?

I can reproduce this, what I did:

  • 5 tabs with Chrome work correctly
  • open new tab, nothing shows
  • went to any of the other 5 tabs, reload, nothing shows
  • close 1 tab, all 5 left start working again

Then I used Chrome Incognito, I was able to replicate the above test so I had 10 tabs working 5 in Chrome, 5 in Chrome Incognito.

Then I used Firefox, 5 tabs work correctly. Opened Private browsing with other 5 tabs. I have now 20 tabs working. If I add one more in any of the 4 browsers (Chrome, Chrome Incognito, Firefox, Firefox Private) then that browser stops working but the 3 others work correctly.

Project, just a WebButton.

So I think your application can handle more than 5 simultaneous users just not any 1 user with more than 5 tabs to your application.

ezgif.com-gif-maker (17)

6 Likes

The limit per browser/domain should be 100 for HTTP2, maybe is a bug in the xojo server implementation?

Project with only a web button.
5 tabs with same browser works, if you open a 6th tab then nothing works.
Do you need more information or create an Issue case?

2 Likes

I think we can use the same created by @Mike_D. The other thread has also plenty of information.

Thank you!

1 Like

@Ricardo_Cruz fixing Mike’s case #69982 didn’t fix the problem with the 6th tab on a browser.

As you can see 5 tabs work correctly, the 6th never loads:

image

@Ariel_Albarracin1 created case #71338

If we open 6 or more tabs on the same browser, the Application stops responding until we close tabas and only have 5 or less.

Tested on a simple WebPage with 1 button (pressed event doesn’t fire if we have 6 tabs or more on the 5 tabas that the button shows, the 6th doesn’t even show the button) running locally on a Mac. Also a Web 2 project on a Linux server.

Easy test: open 6 tabs to https://showcase.xojo.com the 6th never loads and the other 5 became unresponsive.

Edit: I don’t know if this is clear. I can have 5 tabs using Chrome, another 5 tabs using Firefox, another 5 tabs using Safari and all works, if we open a 6th tab then we have the problem (only on the browser that have 6 or more tabs, not the others).

1 Like

Your browser only allows a set number of active connections thus testing the maximum sessions trough a browser is not the way to run a xojo web app. This is out of Xojo’s control.

If that is the case maybe @Ricardo_Cruz can explain why I can open 11 tabs to a Xojo Web 1 application and it works without problems but if I open 6 tabs to a Xojo Web 2 application then all tabs stop working? Maybe there is something that Xojo can control.

1 Like

What happens if you open a “new private window” in Safari and try this in that private safari window?

You can have 10 tabs per browser, 5 normal and 5 private/incognito.

Looks like that the limit only happens if the server sent events (SSE) are NOT used with HTTP 2.0.

And since the “modern and updated” xojo framework uses HTTP 1.1 (2001), the framework is limited.

This is NOT out of Xojo’s control. They could either use HTTP 2.0, or a technology more in sync (older) with the HTTP 1.1 instead of SSE.

In the end that combination was something they decided to use.

Well… I’ve tried and got 8 tabs running fine (I can click different entries in all of them and they load and display)
:man_shrugging:

Sorry, didn’t test Safari Private Window before, I assumed it worked the same as Chrome/Firefox.

I can open 8 tabs in Safari Private without problem too.

1 Like

I’m getting the behavior Alberto describes.

For me, all I do is open the showcase link in a new tab and wait to see something onscreen. Tab 6 never loads a visible UI and tab 7 never connects.

Firefox 108.0.1

1 Like

That’s what I’m seeing in a “normal” Safari Window, too.
However, in a “private” Safari Window, I can open 10 Tabs with the Showcase app just fine (I did such as you’ve described: wait until content is shown in tab, then open the next tab).

So there seems to be a difference with a “private window”, which might give a clue.
That’s about all I can add to this topic.

1 Like

Browsers will limit the open connections per domain in HTTP/1.1, which prevents the EventSource API from working beyond ~5 tabs (Xojo consumes 1 EventSource connection per tab).

Both, Apache and NGINX, have a setting for enabling HTTP/2. Enabling it, will increase the limit to 100 connections (it can be configured and increased, if needed).

That said, there is a feature request for supporting HTTP/2: Issue #38227

But please keep in mind that most browsers won’t connect to HTTP/2 resources without a valid SSL certificate. We will likely have to maintain HTTP/1.1 by default anyway, at least for development.

1 Like

The 100 connections limit is for HTTP/2 connections right? In other words, Xojo needs to support HTTP/2 for the Apache/NGINX setting make a difference.