Edit: I thought you said your server was on Xojo Cloud, but I see that it's not.
I too am at a loss. We have hundreds of customer apps running on Xojo Cloud built with various versions of Xojo which are not encountering these issues, including a few of ours.
@Alexandre C - no, it is not a bug in the cgi script. Every Xojo web app cgi script is identical. If something were wrong, they’d all be failing.
The issue with the path for the reconnect ping (#51525) which seem to require a special webserver configuration (present at Xojo Cloud) is just a second thing preventing the automatic re-connect. I think it is negligible here.
That’s not what I said. On Xojo Cloud, the servers are configured to allow the cgi script to behave as an index file so that they don’t have to appear in a he url... and since the trailing “xojo/ping” is virtual, it should work just fine. This configuration is not required for the feature to work.
The 504 Gateway error indicates that the app simply isn’t responding in the time that Apache thinks is long enough, about 40 seconds in this case, and yes, that is too long for a web app to take to respond. Humans get frustrated at 3 seconds, 40 is an eternity.
App crashes are usually the culprit, but if the app isn’t crashing, the second most likely scenario is that the app is hung because it’s waiting for something. If your app connects to another service or server, make sure those are “always” available, that the appropriate firewall ports are open and if something unexpected happens that your app doesn’t crash if it gets no result (like an empty result from an HTTPSocket when you are expecting json).
The next most common issue is that your app has a method that takes a lot of cpu for an extended period of time, effectively locking out the browsers until it’s finished. This usually occurs because of an unyielding tight loop in your code. A common example is retrieving a large recordset and sending all those rows to a listbox at once. It’s a double whammy actually because you pull the records in a loop and then all that data has to be sent to the browser.