Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Session timeout using setMaxInactiveInterval
Session timeout using setMaxInactiveInterval [message #834673] Mon, 02 April 2012 08:47 Go to next message
Amandeep Chahal is currently offline Amandeep ChahalFriend
Messages: 85
Registered: September 2011
Location: India
Member
Hi,
We have the following implementation for session time out on Browser close :
1. Detect browser close events using the Polling mechanism (client side js to regularly send requests to the server).
2. Once these requests stop coming, invoke setMaxInactiveInterval on that session with small time interval (we have it set to 2 secs)
3. Added SessionStoreListener, overridden beforeDestroy to release the application created session objects.

Sometimes this doesn't work. The setmaxInactiveInterval is getting invoked on the right session but the code in beforeDestroy does not get executed.
Are there known scenarios where this might fail?

The application is hosted on Tomcat and one observation we made was that for the first few hours after server startup it works fine. Then it fails for one of the sessions and all subsequent requests for session close end up in this state.
Please suggest.

Regards,
Aman
Re: Session timeout using setMaxInactiveInterval [message #835281 is a reply to message #834673] Tue, 03 April 2012 02:13 Go to previous messageGo to next message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
Do a thread dump when things stop working
Check to make sure there are no deadlocks that Tomcat's session reaper thread is caught up in.
Re: Session timeout using setMaxInactiveInterval [message #835490 is a reply to message #835281] Tue, 03 April 2012 09:36 Go to previous messageGo to next message
Avrajit Chatterjee is currently offline Avrajit ChatterjeeFriend
Messages: 68
Registered: September 2011
Member
Hi ,

We have taken a thread dump and see that there are as many as 40 UIThreads in wait state on object monitor.(attached 3 of them) We see that there is a tomcat background thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" which I guess is a Tomcat 7.0.25 session reaper which waits infinitely in org.eclipse.rwt.internal.lifecycle.UIThread.terminateThread(UIThread.java:118). This is a call to getThread().join() i.e. it waits infinitely for the thread to die. This is very similar to RAP bug 360630.Hence all the following UI threads are also not killed as the session reaper itself in waiting.
We use RAP 1.5M4 , Tomcat 7.0.25, and JRE "1.6.0_0".

Another key observation is when we invoke setmaxInactiveInterval() from UICallBack.runNonUIThreadWithFakeContext() the session times out properly. That means that it does not wait for the Tomcat session reaper to close the session.

Any pointers whether this is a RAP or Tomcat issue?

[Updated on: Tue, 03 April 2012 09:38]

Report message to a moderator

Re: Session timeout using setMaxInactiveInterval [message #841404 is a reply to message #835490] Wed, 11 April 2012 08:53 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

I'm not sure if this could be related, but there has been a deadlock
caused by the file upload code, which has been fixed in M6 [1]. If you
use the fileupload/filedialog, you could try to reproduce it with the
latest milestone build.

Regards, Ralf


[1] 372946: Deadlock on session restart
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372946

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:How to empty the RAP a DateTime control?
Next Topic:[Solved] Problem Integrating RAP/Spring DM
Goto Forum:
  


Current Time: Fri Apr 26 14:36:46 GMT 2024

Powered by FUDForum. Page generated in 0.03362 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top