Problem - Session expires randomly

Hi. We have a big application based on Vaadin Framework 7.7.10 that is
currently running on different production servers at different customers.

We have been reported several “Session expired” messages while they are
working on our application.
This has appeared seldom on a couple of installation but are occuring
frequently on a recent one.

The application is hosted on a tomcat 8.5.30 - proxied by an apache 2.4.
Session in tomcat has been set with no timeout and the HEARTBEAT mechanism should (and normally does) keep the session

We aren’t able to reproduce the error which appears randomly - looking
at apache and applicative logs we only found:

  • some 410 error reported on HEARTBEAT posted (no specific errors in
    corresponding application logs)
  • some unexpected refs to &X-Atmosphere-Transport=close - and all of
    them with an out of sequence timestamp in logs,
    eg:     [10/Oct/2018:11:17:20     GET 
/deskoperativo/?ticket=ST-5288-faDnH6V0J7iJpOxoYQC2-elibra1 HTTP/1.1     [10/Oct/2018:11:16:12     GET 
HTTP/1.1     [10/Oct/2018:11:17:20     GET 

Any of you experienced similar problems? Any solution / hint about what
to look at?

These kind of issues are reported time to time. Since they occur randomly, and usually in production only, they are hard to debug. There reasons may be different case by case. I would suggest to check the following 1. update to 7.7.15, which has some bug fixes in Atmosphere, 2. make proxy timeouts longer (or increase capacity), in case it is due increased traffic and your proxy is the bottle neck, i.e. produces premature time-out and hence server thinks that someone closed the browser 3. it is just random error in network connections 4. investigate user environment, if they have plenty of browser tabs and apps in use, the browser may get stuck, hence no response to heart beats.