I see that somehow push connection is established only after 5 min of inactivity (301347ms). That is really strange.
Let’s try to figure out what is going on.
First of all, enable logging of HTTP session expiration in logback.xml config or using Server Login window:
<logger name="com.haulmont.cuba.core.sys" level="DEBUG"/>
You will see the following log statements in app.log:
2018-01-08 16:38:37.090 DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] com.haulmont.cuba.web.sys.CubaVaadinServletService - HttpSession destroyed: org.apache.catalina.session.StandardSessionFacade@5d9b1bd5
If thread is ContainerBackgroundProcessor
then session has been evicted by servlet container due to inactivity.
Second, there is a chance that your problem is related to this Vaadin issue: Heartbeats blocked during long run request · Issue #9663 · vaadin/framework · GitHub This issue has been fixed in Vaadin 7.7.13 and we will bring updated Vaadin version in the very next bug fix release 6.7.7 https://youtrack.cuba-platform.com/issue/PL-10210
I’d recommend that you properly set proxy settings if your customers use something like Nginx / Apache proxy: Server Push Settings - CUBA Platform. Developer’s Manual Take into account these headers:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
Also, you can try to disable WebSocket (cuba.web.pushEnabled
app property) or switch to long polling directly using cuba.web.pushLongPolling
app property. It seems that the problem is somehow related to WebSocket and proxy settings.
Are there heartbeat log statements in your app.log like the following ?
2018-01-08 16:43:40.570 DEBUG [http-nio-8080-exec-10/app/admin] com.haulmont.cuba.web.App - Ping middleware session
There should be 3 log statements per session life time, thus if session timeout is 30min - every 10 min.