But are there any workarounds or solutions? Our clients get slowly mad
itās not cool, actually. If you run your standalone web app on a server that is not exposed on the internet and not used, the application quits? or the application quits only if it is used? by a single user or several?
The problematic version is 2017.R3?
IĀm still waiting for each of you to look in /var/log/messages or /var/log/kernel and tell me if there are any log entries related to your app.
cat /var/log/messages | grep yourappname
Using that command should show only the errors for your app.
Hi Greg!
I built a simple test app, on my server:
test.cgi
the source code can be downloaded here:
project.zip
there are no log entries on /var/log/messages file on server.
I hope someone can help me to fix this crazy error!
NOTE: only occurs on Mac !
No, itās not. I moved from a host provider to another about 3 years. Since then, i have this problem.
I never worried about this, since all users of the application were windows.
unfortunately, or not, my last application is focused on mac users, and everyone is having this problem.
this is the reason why I am really and incessantly seeking a solution!
Boy I really wish weād done this sooner. Now that Iāve seen your app and explanation, Iāve got a much clearer understanding about what you are experiencing. Some observations:
The whole app isnāt closing, right? Just the Sessions where a mac is connected?
Looking at my browser (a mac), Iām getting 504 Gateway Timeout responses from the server. That means that the app or the web server isnāt responding to the browser quickly enough. That said, my browser is still connected to the test app after 30 minutes
We need a few more details about what your mac users are experiencing.
First of all, which browser are they using? Safari, Chrome, Firefox, Opera, something else?
Do you have any screen recordings of this problem they are having?
Alexandre, I opened the url on Safari, Firefox and Chrome and I donāt see it closing after 20 minutes or so.
I reloaded the page and I donāt see anything with Safari or Chrome, but I see this with Firefox (for a split second):
I hope it helps.
Your app has errors;
[quote=374148:@Greg OāLone]Boy I really wish weād done this sooner. Now that Iāve seen your app and explanation, Iāve got a much clearer understanding about what you are experiencing. Some observations:
The whole app isnāt closing, right? Just the Sessions where a mac is connected?
Looking at my browser (a mac), Iām getting 504 Gateway Timeout responses from the server. That means that the app or the web server isnāt responding to the browser quickly enough. That said, my browser is still connected to the test app after 30 minutes
We need a few more details about what your mac users are experiencing.
First of all, which browser are they using? Safari, Chrome, Firefox, Opera, something else?
Do you have any screen recordings of this problem they are having?[/quote]
Safari
Didnāt test on Chrome and Firefox
this app i used for example, does not call mysql at all
@Alexandre Cunha
Same observation as Greg. On my Mac (10.12.6), safari and firefox (http://alemac.com.br/cgi-bin/test/test.cgi), the web app doesnāt quit, but the browser canāt communicate properly with the Xojo server app (all Xojo push requests have a 504 error).
Ok. Great!
So whatās the solution / fix for this?
I really donāt know what to do.
Alex
Sorry for late reply as it was Chinese New Year holiday hereā¦
https://drive.google.com/open?id=1gItUPkdQ_bKZh2CHTnSA8Re4AZxUFcke
This is the screen cap of the console when running my app in debug mode. I startup my app, didnāt type anything (login details grabbed from cookie), let it stand still. After a minute or 2, the event āpushā coming out and seems it cannot be finished, then keep trying. In deploy mode, there is another āpingā action but it does successfully. Just wondering if this cause the timeout for the app thus lead to app crash.
[quote=374258:@Tony Lam]Sorry for late reply as it was Chinese New Year holiday hereā¦
https://drive.google.com/open?id=1gItUPkdQ_bKZh2CHTnSA8Re4AZxUFcke
This is the screen cap of the console when running my app in debug mode. I startup my app, didnāt type anything (login details grabbed from cookie), let it stand still. After a minute or 2, the event āpushā coming out and seems it cannot be finished, then keep trying. In deploy mode, there is another āpingā action but it does successfully. Just wondering if this cause the timeout for the app thus lead to app crash.[/quote]
I saw this push event somewhere on my logs or erros, or somewhere but i canāt remember where!
[quote=374182:@olivier vidal]@Alexandre Cunha
Same observation as Greg. On my Mac (10.12.6), safari and firefox (http://alemac.com.br/cgi-bin/test/test.cgi), the web app doesnāt quit, but the browser canāt communicate properly with the Xojo server app (all Xojo push requests have a 504 error).[/quote]
Olivier, please confirm that itĀs all push requests. On my side, it was one out of 10 and the app kept working. FWIW, This behavior is expected once in a while (although IĀve never seen it like this).
[quote=374258:@Tony Lam]Sorry for late reply as it was Chinese New Year holiday hereā¦
https://drive.google.com/open?id=1gItUPkdQ_bKZh2CHTnSA8Re4AZxUFcke
This is the screen cap of the console when running my app in debug mode. I startup my app, didnāt type anything (login details grabbed from cookie), let it stand still. After a minute or 2, the event āpushā coming out and seems it cannot be finished, then keep trying. In deploy mode, there is another āpingā action but it does successfully. Just wondering if this cause the timeout for the app thus lead to app crash.[/quote]
Ok, first of all, we need to stop referring the this as a crash. A crash would mean that the app is quitting (or being forced to quit) and all of the connected users are being disconnected at the same time. ThatĀs not what Alexandre is describing here. ItĀs simply not responding properly to certain users.
As for the 504 Gateway Timeout error, this HTTP error is not generated by the Xojo app itself. ItĀs created by the web server in front of the cgi app in cases where it isnĀt getting a response fast enough. This can happen under several circumstances:
0. The app is crashing during the request (not whatĀs happening here)
0. The app is in a tight loop and too busy to respond (also not whatĀs happening here because itĀs an empty app)
0. Too many users. It could be thisā¦ cgi apps can only handle about 50 simultaneous users.
0. A web server configuration issue. While unlikely, it could simply be that the requests are being misrouted.
0. A framework bug. IĀm not expecting this to be the case or the problem would be more widespread, but it could be that the app canĀt respond for some reason.
What I need next is to know the country and language of the users who are having trouble so we can see if this is some sort of regional encoding issue.
When I test the link to the remote server @Alexandre Cunha has provided with Safari 11.0.3 on 10.12.6 it with the, it seems to affect all push requests. As these are long polling AJAX requests, a delayed response is expected. The CGI seems to sit behind an Apache. That, together with the log excerpt from the OP let me think of an Timeout for CGI requests configured within the Apache.
I tried it from Europe, Switzerland with an Accept-Language of de-ch. All Push requests get an 504 Error after 40.3 sec. Posts to Ping-Requests on the other side can span 137sec but I understand these are delayed while sending not receiving.
CURL-extracted samples:
[code]$ time curl āhttp://alemac.com.br/cgi-bin/test/test.cgi/4D08D700E876726DF30072FAB4918E6B5ED63CD0/comm/pushā \
504 Gateway Timeout-XPOST \
-H āReferer: http://alemac.com.br/cgi-bin/test/test.cgiā \
-H āContent-Type: application/x-www-form-urlencodedā \
-H āOrigin: http://alemac.com.brā \
-H āHost: alemac.com.brā \
-H āAccept: /ā \
-H āConnection: keep-aliveā \
-H āAccept-Encoding: gzip, deflateā \
-H āAccept-Language: de-chā \
-H āDNT: 1ā \
-H āUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6ā \
-H āContent-Length: 0ā \
-H āCache-Control: no-cacheā
Gateway Timeout
The gateway did not receive a timely response from the upstream server or application.
Additionally, a 504 Gateway Timeout error was encountered while trying to use an ErrorDocument to handle the request.
real 0m40.351s
user 0m0.007s
sys 0m0.008s
[/code]
and
[code]$ time curl āhttp://alemac.com.br/cgi-bin/test/test.cgi/4D08D700E876726DF30072FAB4918E6B5ED63CD0/comm/pingā \
-XPOST \
-H āReferer: http://alemac.com.br/cgi-bin/test/test.cgiā \
-H āContent-Type: application/x-www-form-urlencodedā \
-H āOrigin: http://alemac.com.brā \
-H āAccept: /ā \
-H āCache-Control: no-cacheā \
-H āDNT: 1ā \
-H āUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6ā
{ājsSourceā:āXojo.comm.begin();ā}
real 0m0.481s
user 0m0.006s
sys 0m0.005s
[/code]
@Greg OāLone I think my problem is different from AlexandreĀs one as my app is really shutting down with all connected users being kicked out. I am not sure if we need to separate this thread into 2 for separate discussion.
Greg, you have mentioned that cgi has a limitation on 50 concurrent users, does standalone app have the same limitation?
@Greg OāLone In the case of Alexandre, I thought exactly the same as Tobias. All push requests failed after 40 seconds. Like Tobias, I try from Europe (France). @Alexandre Cunha , can you send your Apache configuration file (httpd. conf) please?
Safari
https://www.dropbox.com/s/8jomajf97aaav5f/xojoAlexSafari.png?dl=0
Chrome
https://www.dropbox.com/s/i9p5vh7h1rf1l9h/xojoAlexChrome.png?dl=0