Timeouts in recent Vaadin 7.1.8?

Hi guys,

I’ve recently upgraded to Vaadin 7.1.8 and I believe (I didn’t verify it yet) that since then I get a lot of (session) timeouts. Basically I can use the application as long as I want but if I wait a little to long (5 minutes are confirmed, but I think it’s even sooner) between interactions, the UI becomes unresponsive (red circle on top right corner).

Apart from the debug log window, there is no output on the server / client console. If I understand correctly, sessions should not time out as long as there are heartbeats and as it seems, heartbeats are working correctly, so from my understanding, a browser tab should NEVER time out as long as it’s opened somewhere in the background… right?

Belows the output of the debug windows, help is very much appreciated!

1451msPush connection established using websocket
39133msCould not determine ApplicationConnection for Overlay. Overlay will be attached directly to the root panel
300474msSending heartbeat request...
300786msHeartbeat response OK
300786msScheduling heartbeat in 300 seconds
342470msVariable burst to be sent to server:
342470ms   160 (class com.vaadin.client.ui.table.TableConnector) :
342470ms      v.v(pagelength : 28)
342470ms   166 (class com.vaadin.client.ui.table.TableConnector) :
342470ms      v.v(pagelength : 12)
342470ms   137 (class com.vaadin.client.ui.ui.UIConnector) :
342470ms      com.vaadin.shared.ui.ui.UIServerRpc.resize([1018, 1920, 1920, 1018]
)
342470ms   143 (class com.vaadin.client.ui.nativebutton.NativeButtonConnector) :
342470ms      com.vaadin.shared.ui.button.ButtonServerRpc.click([LEFT,205,21,false,false,false,false,1,78,21]
)
342470msMaking UIDL Request with params: 1f2f3312-e9b5-4d4b-a3cb-95ec9085efda[["160","v","v",["pagelength",["i","28"]
]],["166","v","v",["pagelength",["i","12"]
]],["137","com.vaadin.shared.ui.ui.UIServerRpc","resize",["1018","1920","1920","1018"]
],["143","com.vaadin.shared.ui.button.ButtonServerRpc","click",[{"clientY":"21", "clientX":"205", "relativeX":"78", "metaKey":false, "type":"1", "shiftKey":false, "ctrlKey":false, "button":"LEFT", "relativeY":"21", "altKey":false}]
]]
342470msSending push message: 1f2f3312-e9b5-4d4b-a3cb-95ec9085efda[["160","v","v",["pagelength",["i","28"]
]],["166","v","v",["pagelength",["i","12"]
]],["137","com.vaadin.shared.ui.ui.UIServerRpc","resize",["1018","1920","1920","1018"]
],["143","com.vaadin.shared.ui.button.ButtonServerRpc","click",[{"clientY":"21", "clientX":"205", "relativeX":"78", "metaKey":false, "type":"1", "shiftKey":false, "ctrlKey":false, "button":"LEFT", "relativeY":"21", "altKey":false}]
]]

The upgrade from 7.1.7 to 7.1.8 brought on the same hang condition for me. I lack the skill to diagnose it, but note the following:

  • using streaming, rather than websockets transport for push solves it, but loses the advantages of websockets and leads to failure when the internet is much less than perfect,
  • hangs caused by Tomcat 7.0.47 are discussed
    here
    . Is this related?
  • recent posts by Mike Pilone have contributed many insights on items similar to this one.

The session is not timing out, heartbeats continue. Rather, we’re waiting forever for a response to a push message that never comes.

Which server are you using? I’m seeing the same effect on Jetty 8.1.10 and it seems to be because there’s an enforced 5 minute timeout that kills idle websockets - and Vaadin does not realize this since Jetty does not seem to send any message to the client at this point. Other server software might have similar issues.

The timeout should be overrideable but I haven’t yet found out how to do it.

I’m running Tomcat 7.0.42.
Thx for the links, I’ll have a look at them!

Hi.

I’m using Tomcat 7.0 and Vaadin 7.1.8, and experiencing the same issues when Push is enabled. I had to fallback to Refresher instead of Push for now.

Well as suggested, it works for me using Streaming instead of Automatic detection (which usually uses Websockets in my environment).

Same for me since 7.1.8 with Jetty 7 and 8. Is there an issue that I can watch?

Thanks for the reports.

Anyone able to reproduce the issue and provide a minimal but complete test case, please
open a new ticket
on Vaadin trac.

Created http://dev.vaadin.com/ticket/13015

My Quick & Dirty solution, while waiting for a real one. I’m pretty desperate!
Lower the heartbeatInterval to less than 5 minutes and Override the setLastHeartbeatTimestamp method in your UI…

@Override
public void setLastHeartbeatTimestamp(long lastHeartbeat)
{
    super.setLastHeartbeatTimestamp(lastHeartbeat);

    if (getPushConfiguration().getPushMode() != PushMode.DISABLED && getPushConnection().isConnected())
        getPushConnection().push();
}

Workaround, call

getPushConfiguration().setParameter("timeout", "-1");

in your UI.init()

There is a client timeout of 5 minutes enabled which should not be there. This causes the client to disconnect silently and a reconnect never happens. This happens only with websockets and not streaming (seems to be a “bug” in Atmosphere but good in this case).

The issue will be fixed in 7.1.9

Thanks Artur. The workaround works and I look forward to 7.1.9. The hard work done by the Vaadin team is much appreciated.