-
1. Re: Wildfly Session timeout configuration
pferraro Feb 24, 2016 2:17 PM (in response to jboss234)Do you mean HttpSession? Configuration of the timeout for web sessions is standardized by the servlet specification (see section 14.4 discussing the <session-config> element of web.xml):
http://download.oracle.com/otn-pub/jcp/servlet-3_1-fr-eval-spec/servlet-3_1-final.pdf
An application can override the default the timeout per session via HttpSession.setMaxInactiveInterval(...) See section 7.5 of the spec, also:
-
2. Re: Wildfly Session timeout configuration
jboss234 Feb 24, 2016 3:00 PM (in response to pferraro)Can it configured through Wildfly configuration files ?
Thanks,
-
3. Re: Wildfly Session timeout configuration
pferraro Feb 24, 2016 5:44 PM (in response to jboss234)Yes - via the undertow subsystem.
e.g.
<subsystem xmlns="urn:jboss:domain:undertow:3.1"> <!-- ... --> <servlet-container name="default" default-session-timeout="30"> <!-- ... --> </servlet-container> <!-- ... --> </subsystem>
30 (minutes) is already the default value.
-
4. Re: Wildfly Session timeout configuration
jboss234 Mar 10, 2016 11:31 AM (in response to pferraro)Tried it but didn't work. Am I missing anything.
Thanks,
-
5. Re: Wildfly Session timeout configuration
pferraro Mar 10, 2016 1:33 PM (in response to jboss234)Can you be more specific? What exactly doesn't work?
-
6. Re: Wildfly Session timeout configuration
jboss234 Mar 10, 2016 2:03 PM (in response to pferraro)Changed default time out to 45 minutes in standalone.xml
<servlet-container name="default" default-session-timeout="45">
Still application is timing out after 2 minutes ? Looks like this change is not making any difference.
Thanks,
-
7. Re: Wildfly Session timeout configuration
pferraro Mar 10, 2016 5:10 PM (in response to jboss234)The default session timeout is only applied if the web application does not specify a session timeout. Are you sure that your web.xml does not already define a <session-timeout/>?
-
8. Re: Wildfly Session timeout configuration
jboss234 Mar 10, 2016 5:22 PM (in response to pferraro)web.xml does not have <session-timeout> defined.
-
9. Re: Wildfly Session timeout configuration
jboss234 Mar 17, 2016 5:09 PM (in response to jboss234)My application's web.xml doen't have <session-timeout> defined, I changed <servlet-container name="default" default-session-timeout="45"> in standalone.xml looks like its not making any difference.
Any other configuration changes I need to make ?
Thanks,
-
10. Re: Wildfly Session timeout configuration
pferraro Mar 22, 2016 6:20 PM (in response to jboss234)Please file a bug report for the Web/Undertow component at Agile Board - JBoss Issue Tracker
In the meantime, use <session-timeout/> in web.xml.
-
11. Re: Wildfly Session timeout configuration
swd847 Mar 22, 2016 6:35 PM (in response to jboss234)Why is your session timing out after 2 minutes? The only way that can happen is if you configured this in web.xml, or you have some code that is manually setting the session timeout. The default is 30 minutes.
-
12. Re: Wildfly Session timeout configuration
skull Jun 6, 2016 9:22 AM (in response to pferraro)I am using wildfly 10.0.0-Final with domain mode + cluster with ajp + apache 2.4 with mod_cluster 1.3.1.
I have in web.xml :
<distributable /> <session-config> <session-timeout>30</session-timeout> </session-config>
and the session timeout is never fired.
If i test with standalone everything is ok.
-
13. Re: Wildfly Session timeout configuration
pferraro Jun 6, 2016 6:00 PM (in response to skull)When using distributed web sessions, session expiration notifications will only trigger on one node in the cluster. Normally, this will happen on the node that created the session, but that can change if the cluster topology changes (i.e. ownership is based on a consistent hash of the session id as well as the membership size). Might this be the case?
-
14. Re: Wildfly Session timeout configuration
skull Jun 7, 2016 8:24 AM (in response to pferraro)Not the case. I just have one node at cluster, and if user do not call logout ("session.invalidate()"), I think that never happen on session timeout 30min.
In wildfly 8.2 its ok, I see this erro after update to wildfly 9.0.2, and now I migrate to wildfly 10 but still the same.