wang-haha / memcached-session-manager

Automatically exported from code.google.com/p/memcached-session-manager
0 stars 0 forks source link

when session-timeout is too large in web.xml memcached expires the msm sessions immediately #187

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

in web.xml set the session-timeout to a large number:

        <session-config>
                <session-timeout>50000</session-timeout>
        </session-config>

in context.xml set sticky="false" for the msm settings.

What is the expected output? What do you see instead?

Sessions are immediately expired.  You can see this by running memcached with 
-vvv.  Anytime a session is stored, the first time it is read you'll see " 
-nuked by expire" along with the read.

What version of the product are you using? On what operating system?

tomcat 6.0.35, 6.0.36, 6.0.37
msm 1.6.5 and master
spring 3.1 container
centos 5.9
memcached 1.4.15

Please provide any additional information below.

This only fails when sticky="false"

Original issue reported on code.google.com by scott...@gmail.com on 12 Dec 2013 at 6:54

GoogleCodeExporter commented 8 years ago
You should be able to use a session-timeout of 43200 (30 days, see 
https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L79). Is 
that an acceptable workaround for you?

Original comment by martin.grotzke on 18 Dec 2013 at 9:54

GoogleCodeExporter commented 8 years ago

Original comment by martin.grotzke on 18 Dec 2013 at 10:46

GoogleCodeExporter commented 8 years ago
Btw, I saw that for non-sticky sessions msm passes 2 * sessionTimeout to 
memcached, so right now (in 1.6.5) the max sessionTimeout for non-sticky 
sessions should be 21600.

Original comment by martin.grotzke on 19 Dec 2013 at 10:04

GoogleCodeExporter commented 8 years ago
In response to your question, the workaround is fine.  I was just trying to be 
a good samaritan and file the bug.  I couldn't find any documentation or an FAQ 
on the issue, but a couple people did complain about it with no resolution, so 
I wanted to make sure the bug was filed.  The issue was driving me absolutely 
crazy for a while so I am just glad I figured how to work around it.

I know about the memcached 30 day expiration "feature" but for some reason I 
could not get it to break with 43200.  Either way, I am good.

thanks!

Original comment by scott...@gmail.com on 28 Dec 2013 at 1:22

GoogleCodeExporter commented 8 years ago
Yeah, thanx for filing the issue. It's fixed in 1.7.0 I released some days ago. 

Cheers

Original comment by martin.grotzke on 28 Dec 2013 at 6:48