setting proper timeouts

Using vaadin 7.0.4:

I am having alot of trouble getting the time outs of my application correct.

I want to basically time out after 90s if a user quits the web browser or the browser crashes. We do work with the # of active users so we need this number to be pretty accurate.

To achieve this 90s time out I changed the heartbeat but also had to change the session-timeout, in web.xml:

1


<init-param>
		<param-name>closeIdleSessions</param-name>
		<param-value>false</param-value>
	</init-param>
	
	<init-param> 
	    <param-name>heartbeatInterval</param-name> 
	    <param-value>30</param-value>
	</init-param>

With this things time out at 90s if user quits browser/browser crashes but randomly the heart beat will fail and users will see a session expired error as they are using/navigating in the app! This error is hard to reproduce at will but happens. I believe it may have something to do with the session-timeout being 1 minute?

I got to the above settings with alot of trial and error. If I change anything then users don’t time out in 90s.

Anyone have any insight on this?

Hi, given those numbers, the session should timeout quite easily if one or two heartbeats are lost for some reason. Now, the interesting question is - why do the heartbeats fail? Do your users have a particularly unreliable network connection? If you can reproduce this, can you check if there are any errors in the browser or server log?

ok. where can we look to read the vaadin’s implementation of heartbeat code?