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
alive.

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:
192.168.212.143     [10/Oct/2018:11:17:20     GET 
/deskoperativo/?ticket=ST-5288-faDnH6V0J7iJpOxoYQC2-elibra1 HTTP/1.1
192.168.212.143     [10/Oct/2018:11:16:12     GET 
/deskoperativo/PUSH?v-uiId=0&v-csrfToken=92cd4a63-3bb5-44ed-9d87-c0445b60f5cd&X-Atmosphere-tracking-id=3e375f05-b103-4f0e-b7d1-db5829fefc96&X-Atmosphere-Framework=2.2.13.vaadin5-javascript&X-Atmosphere-Transport=long-polling&X-Atmosphere-TrackMessageSize=true&Content-Type=application%2Fjson%3B%20charset%3DUTF-8&X-atmo-protocol=true&_=1539162970871 
HTTP/1.1
192.168.212.143     [10/Oct/2018:11:17:20     GET 
/deskoperativo/PUSH?v-uiId=0&v-csrfToken=92cd4a63-3bb5-44ed-9d87-c0445b60f5cd&X-Atmosphere-Transport=close&X-Atmosphere-tracking-id=3e375f05-b103-4f0e-b7d1-db5829fefc96&_=1539163038887 
HTTP/1.1

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.