Did you recently build it with a different version of Xojo? A month ago I updated our web app and used a different version than before and I too had lots of errors, my service was down for 4 hours. Until I dug out an older version of Xojo that worked for me.
I occurs not on every action, but it often occurs when the server has to send some actions or data back to client.[/quote]
Unfortunately what you’ve provided is close to nothing. The framework is compiled differently for every app depending on what controls are used and in what order they are encountered when compiling. Saying line 6411 or 281 is worthless without at least having access to the online app.
That said, a 5xx error is a server error and the most frequent answer in these situations is that the app is crashing. Do you have the UnhandledException events implemented and outputting the stack to a file?
How is your proxy setup? It almost looks like a proxy configuration problem, but it’s not clear to me how things are running. Not sure why you would proxy to a cgi. Maybe you could describe your setup a bit.
Also, I haven’t checked myself, but is it normal to see requests as HTTP 2.0 to a xojo cgi app? I was thinking it didn’t support 2.0, but maybe that only applies to stand alone apps.
My Setup:
I have a root server with plesk. I’ve got Apache running and Nginx. Nginx delivers all to Apache. I’ve got no special options there.
In the apache2.conf I activated CGI using this:
ScriptAlias /cgi-bin/ /var/www/vhosts/{the/folders}/via_app/
<Directory "/var/www/vhosts/{the/folders}/via_app/">
AllowOverride All
Options +ExecCGI
Options FollowSymLinks MultiViews
Require all granted
</Directory>
Why does only sometimes some action fail in an 504 error, and not everyone? The app itself is still running. And there is no problem running the app locally.
If you can use a proxy, then I personally would recommend just going to haproxy and make that work. For public facing apps I only run stand alone behind haproxy. I’ve got a few things out there running and I can’t recall any issues I’ve had running things that way.
For the apps I have running as cgi, they seem to have issues now and then. I have started using htaccess files to password protect them at the apache level to keep bots or search engines or who knows what from randomly hitting them and making them lock up. These apps are low usage internal, but are accessible for us from the internet.
So for me, I’ve had good success with haproxy -> stand alone app. You can put haproxy in front of almost anything, so if you need apache and/or nginx too, then you can also put them behind haproxy.
There’s also a new plugin apparently (which I haven’t tried yet) to allow haproxy to pull Let’s Encrypt ssl certificates for your sites without having to take anything offline during the verification process. I plan on setting that up on one of my sites when the current ssl cert is close to expiration.
That error is not specific enough as we don’t know the reason for the timeout. Could be the config issue from the other thread. Might want to link that thread in here and just stick to one, or start over with the current status and configuration. I’d really like to help you get this working, but it’s become quite scattered.