Odd HttpSocket behavior


one of our applications got a huge update during the last weeks, where we implemented multiple third-party-APIs. To communicate with these apis we use httpsecuresockets (of course).

There’s no magic inside, there are just plenty of them in some operations. The sockets it self are working properly, we have no error or exceptions.

We have about 10 users online parallel and if they use those new functions with the bunch of sockets, we observed the odd behavior, that the session crashs and the browser refreshs the page.

We also observe this in another instance of the application, which still on an older version, but since we updated one instance, the other shows the same problems while working with sockets.

We compile using Xojo 2018 R4 (19 R1 is not usable yet, they fucked up the whole socket thing).

We increased the number of maximum SecureSockets from 400 to 1000, which seems to make the apps more stable.

Does anyone experience the same behavior? What could be a way to inspect or to prevent those session-restarts?

This is our JS console right now oO


A 502 HTTP error is Bad Gateway which means that the upstream server (the web app in this case) sent a bad response.

Are you sure that it’s crashing just the Session? Given what I wrote above, I’d bet that the entire app is going down and getting restarted.

Have you implemented App.UnhandledException and returned True there to keep that from happening?

[quote=434161:@Greg O’Lone]Have you implemented App.UnhandledException and returned True there to keep that from happening?

Hi Greg,

Yes, we implemented it. We also implemented an error log when this event is fired. But the crash logs are not really useful.

Can a webapp start itself again while running in standalone mode? I thought this was not so?!

If not then just the session shuts down. We also observe, that not every user is kicked out every time.

When the app itself crashes, then another application on our server restarts the app within one minute, that is mostly not the case.

These errors are just randomly popped up. We see the behavior also, when the js console doesn’t look this.

Thanks for your help man!