Open GoogleCodeExporter opened 8 years ago
+ JDK 1.7 or JDK 1.6
Original comment by cj84...@gmail.com
on 4 Sep 2013 at 2:38
Do you use sticky or non-sticky configuration?
Original comment by martin.grotzke
on 4 Sep 2013 at 8:14
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n1:localhost:11211"
sticky="false"
sessionBackupAsync="true"
memcachedProtocol="binary"
operationTimeout="10000"
sessionBackupTimeout="10000"
lockingMode="none"
requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"
transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"
customConverter="kr.co.infraware.polaris.persistent.kryo.LocaleCustomization"
/>
It's My Configuration.
i used to non-sticky configuration.
Original comment by cj84...@gmail.com
on 4 Sep 2013 at 8:27
Ok, then it makes sense. Non-sticky session are removed from the local session
map at the end of a request. This is needed to prevent stale session data:
assume that tomcat1 serves request1 and sets foo=bar in the session. Afterwards
tomcat2 handles request2 and sets foo=baz. Then tomcat1 handles request3, now
the session should return foo=baz. If tomcat1 would keep the session locally it
would not get the changes done by other instances. Therefore in a non-sticky
configuration sessions are only stored in memcached and only loaded to handle a
request.
This behaviour should be documented, this is what can be improved. But that it
works how it works is "by design" and not a bug - sorry for that ;-)
Original comment by martin.grotzke
on 4 Sep 2013 at 9:56
yeah. I got it.
I have implemented in a way that avoids this problem.
I solve this problem, but the problem is still present in the environment
sticky.
1. Multi-WAS
2. msm is assumed to be a sticky configuration.
L4 or http server environment is set to non-sticky problem arises when the
session expires.
(A user -> A WAS request -> C WAS connect -> after session invalid time A WAS
Session expired -> A WAS Connect -> A Session Expired)
If you think there is a problem if this portion. document should be updated.
Original comment by cj84...@gmail.com
on 5 Sep 2013 at 5:32
1. Multi WAS -> Multi WAS, non-sticky loadbalancing
Original comment by cj84...@gmail.com
on 5 Sep 2013 at 5:33
A non-sticky loadbalancer in combination with sticky tomcat/msm does not make
sense - you'll get stale sessions.
Is the HttpSessionListener also not invoked when you just access one tomcat and
wait for session expiration?
Original comment by martin.grotzke
on 5 Sep 2013 at 11:17
I do not know why it would stale.
anyway, If the answer to the question is ok.
one tomcat, wait for expiration...
then not invoked.
Original comment by cj84...@gmail.com
on 6 Sep 2013 at 5:31
Hi cj84..@gmail.com
could you tell me how u fix this top ?
Thanks.
Original comment by haroldy...@gmail.com
on 8 Apr 2015 at 5:29
At the moment we reveted the configuration sticky on balancer and sticky on
memcached. An initial workaround was the implementation of a thread that
destroy the expired sessions.
Original comment by denis.si...@gmail.com
on 9 Apr 2015 at 5:43
Issues are moved to github, this one is now
https://github.com/magro/memcached-session-manager/issues/219. If this is still
relevant to you please post an update to the github issue.
Original comment by martin.grotzke
on 24 Aug 2015 at 3:51
Original issue reported on code.google.com by
cj84...@gmail.com
on 4 Sep 2013 at 2:32