No, this can happen also while the app is still running. In fact, there are a lot of situations where this could happen.
We notice this behaviour in several situations:
- One task takes longer than a specific amount of time. Then either the webbrowser or the webserver kills the connection.
- Nginx for example closes unresponsive connections after a minute, but this can be changed though settings.
- Webbrowsers closing connections also after a minute, when a fetch to the server took to long. This is then usually a design flaw in your application.
- If you’re using transactions then make sure that you always commit or rollback them. Open transactions can lead to this behaviour as well. I think it has something to do with the database plugins of Xojo. We are using MySQL and we’ve seen this so often.
- Mixed Content (https/https) and false CORS preferences can lead to a situation where the browser blocks external scripts and assets, which your app maybe relies on.
- There was this bug when
SessionContextObject in place.
- When you use a webtimer, which is a frontend-control then there are also some situations with a resulting session-breakdown:
- When the timer fires to fast, faster, than the server can compute the executed code, then the Action-events stacks and the server kills the connection eventually.
- This also happens when you have a high latency. Then it can happen that the timer Action event is sent multiple times in the same second to the server.
- If you’re using external scripts, for example with the WebcontrolWrapper, there are some ways to trigger this problem.
- If you’re using the
open event of wencontainers instead of the
shown event to do some vast UI stuff, then it could result in weird behaviours.
These are just the first few reasons we’ve been through the last couple of years. We were newer able to determine why exactly it happend, we were just able to reproduce it sometimes and to develop workarounds.
But, it still happens occasionally in our application. We just got better to avoid most of the situations. Even extended logging didn’t brought us enlightment.