So… I have a webapplication, built with the previous 2 versions of Xojo 2021 as expected.
I have updated Xojo to r3, built the webapp and uploaded it.
ABSOLUTELY NOTHING was changed to the webapp code!
Now my clients are reporting they keep getting disconnected from the webapp (I’ve timed it to a minute and 10 seconds, plus or minus a few).
When I am debugging the webapp and doing exactly what my clients are reporting, nothing happens, it works as expected :))
My question: what exactly might trigger the WebSession.InterruptionMessage? The docs simply say “The text the user will see if the connection drops between the browser and the application.” but honestly they need more work with examples as why that might happen.
What can I do to debug this problem? Was there something changed in r3 that skipped the release log? Because from the release log I honestly don’t see anything that might cause this.
Thanks! Much appreciated for any and all input on this matter.
If Not Request.Path.IsEmpty Then
If Request.Path.BeginsWith("apis", ComparisonOptions.CaseSensitive) Then
If Request.Header("apikey").IsEmpty Then
Response.Write("API KEY MISSING!")
Response.Status = 401
Return True
Else
// code to do some api stuff here that returns true
End if
Else
// web interface user
Return False
End If
End If
The disconnect happens with the tab visually opened or if out of focus (other tab).
Haven’t checked developer tools, didn’t even think of it. I will open it to see if it says something…
So far, I’ve managed to track the causality…
If the webapp is running behind nginx (proxy) then there’s that webapp server event “xxxxxx/comm/serverevent” that’s making nginx to throw a “739#739: *17011 upstream timed out”
If I run the webapp directly, bypassing the nginx in the form of http://domain.tld:app_port everything is fine.
Something was changed in Xojo r3 that’s causing this problem and was not mentioned in the release log…
P.S. Thanks @DerkJ for pointing me in the right direction!
I think your nginx is not correctly configured to accept the keep-alive maybe you used http 2.0 setting but you can better keep it http 1.1 since xojo comms mostly use that.
The only thing that changed is xojo now calls a /sessionidhere/comm/ping to check if the session is still online. if not then the session is probably offline or not responding in time ! (threads?, long processes running?)
Neither web 1 nor web 2 support HTTP/2.0 (and never have) so you should make sure nginx isn’t trying to communicate using that. That said, the framework should be returning an error in that case as it definitely would not understand that protocol.