Reputation: 43
I'm working on a web-application which stores some info on the session, this has to stay active for at least 2 hours. ( a bit like a shopping-cart).
I'm working with Apache in front of multiple weblogic instances. The Apache is for caching + just some RR-balancing.
In my web.xml I have configured a session-time out of 120 minutes.
But now I'm wondering about all these Apache settings like the general "Timeout,KeepAlive,KeepAliveTimeout"
and also those that I can specify within the "balance-config", which currently is
SetHandler weblogic-handler
WebLogicCluster serv1:port1,ser2:port2
ConnectTimeoutSecs 10
ConnectRetrySecs 2
KeepAliveEnabled ON
KeepAliveSecs 15
WLCookieName WLBALANCECOOKIENAME
so here I can specify another KeepAliveEnabled / KeepAliveSecs
Do I have to put everything on keepalive=YES and the seconds to 7200+? This make sure my 2 hour session-timeout of web.xml will be respected?
the general "timeout" I can probably put lower because from what I understand this is for long-requests/responds.
Upvotes: 0
Views: 5733
Reputation: 31371
KeepAlive
is not linked to session timeouts on weblogic.
The KeepAlive
in the apache server is for improved performance by using a reusable pool of connections from the Apache plug-in to the WebLogic Server. If the connection is inactive for more than 30 seconds, (or a user-defined amount of time) the connection is closed and returned to the pool.
Still it is recommended to set KeepAlive ON and set the KeepAliveSecs 15 as default.
Now on to your main problem of enabling a 2 hour session timeout. Note: 2 hours is a high amount (the default is only 30 mins) and your Weblogic servers will be using up more memory keeping the session details alive.
I assume you are relying on Apache to direct to the correct Weblogic server based on the user's JSESSIONID. In that case - Apache will send the request to the correct Weblogic server in your cluster - and the user's session will stay alive on that server. Unless you switch on session replication which is another memory hogger.
But to answer your question, your 120 minutes should be respected based on the <session-timeout>
setting in web.xml
It is also possible to set this in weblogic.xml, but the overriding one is web.xml
Upvotes: 2