Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Session timeout

John,

Can you provide the rest of your jetty configuration as regards sessions.  Also, please run your app with debug turned on for sessions (-Dorg.eclipse.jetty.server.session.LEVEL=DEBUG) and post that. You should see some debug info about the maximum idle time and expiry of the session when you create one. Here's some examples for a run with the standard jetty test webapp, with session-timeout=60 in web.xml:

2017-09-05 12:05:05.819:DBUG:oejs.session:qtp184966243-20: setIdleTimeout called: old=0 new=3600000
2017-09-05 12:05:05.830:DBUG:oejs.session:qtp184966243-15: Testing expiry on session node06t4scaybs5j7qagd30qd1eu20: expires at 1504580705830 now 1504577105830 maxIdle 3600000

Is it possible that there is a filter or other application code that is calling session.setMaxInactiveInterval() before your println?

Jan

On 5 September 2017 at 00:22, John English <john.foreign@xxxxxxxxx> wrote:
A while ago I upgraded from Jetty 8 to Jetty 9.4. It supports a web application which includes a session timeout of 60 minutes in the web.xml (which used to work fine):

  <session-config>
    <session-timeout>60</session-timeout>
  </session-config>

However, the sessions no longer seem to be timing out at all since the upgrade. To investigate this, I printed out a debug message at the point where the session is obtained:

    HttpSession session = request.getSession();
    System.err.println("Session timeout: " +
                       session.getMaxInactiveInterval());

The result is the message "Session timeout: 1800", i.e 30 minutes.

I'm completely confused as to (a) why the 60-minute timeout is not happening, and (b) why the timeout interval is showing up as 30 minutes when web.xml sets it to 60. Can anyone please help me understand this?
--
John English
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


Back to the top