Comments (19)
From [email protected] on May 08, 2009 20:40:59
See
http://github.com/jhriggs/memcached-session-manager/commit/ba8e9655e13082e549ed4794ad1196121b6ba16e
from memcached-session-manager.
From martin.grotzke on May 09, 2009 16:15:35
Thanx for fixing this, this is merged now.
Status: Fixed
from memcached-session-manager.
memcached-session-manager-1.9.1.jar with session-timeout mistake!
from memcached-session-manager.
@cnzzr Can you provide s.th. reproducable, e.g. based on https://github.com/magro/memcached-session-manager/tree/master/samples?
from memcached-session-manager.
tomcat 6.0.45
JDK 1.6
windows 2008 R2 SP1 this problem exits on windows 2003 server.
memcached-session-manager-1.9.1.jar
memcached-session-manager-tc6-1.9.1.jar
msm-javolution-serializer-1.9.1.jar
@magro
web.xml config
<!-- 20160218 for MSM session-timeout-->
<session-config>
<session-timeout>60</session-timeout>
</session-config>
use Sticky
app context config:
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n2:localhost:11211,zny:10.219.8.8:11211"
failoverNodes="n2"
lockingMode="uriPattern:/login|/logout"
requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js|gzjs|gzcss)$"
transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory"
/>
view tomcat session with probe 2.4
from memcached-session-manager.
Ok, I need to reproduce this.
from memcached-session-manager.
@cnzzr I can't reproduce this with the sample app. It's already setting the session-timeout to 3 minutes and when I print the session.getMaxInactiveInterval()
in the CounterServlet it also gives me 180 (seconds) - as expected. Btw, I'm running it according to the README with $ mvn tomcat7:run -pl :simpleservlet -am
and then get http://localhost:9090/counter.
Can you please provide a reproduce sample?
from memcached-session-manager.
hello @magro
i just test memcached-session-manager 1.9.1 with tomcat 7 session.getMaxInactiveInterval() value is right.
this problem just exits with tomcat6
my test app just a jsp file.
<%
out.println( "seconds=" + session.getMaxInactiveInterval() + "<br/>");
%>
from memcached-session-manager.
Strange. I just changed the samples to use tomcat6, please see and follow instructions in commit 8e5bcfa to check this (you have to checkout this commit or the branch "issue-48-sessionTimeout-tomcat6").
from memcached-session-manager.
tomcat6.0.37 with jdk6
- session.getMaxInactiveInterval(): 180
from memcached-session-manager.
@cnzzr So it seems to be working as expected, right? If it's not working in your application it seems to be application specific, you might try to continually simplify your app (and/or tomcat/webapp setup) to see when it starts to work.
from memcached-session-manager.
diff tomcat version
tomcat 6.0.45
mvn tomcat is 6.0.37
i have try msm with tomcat 6.0.45 with clear app just one jsp page
app1 without msm show 1800
app2 with msm sho 30
from memcached-session-manager.
@cnzzr I just updated the issue-48-sessionTimeout-tomcat6 branch to use 6.0.45 - this allows to reproduce the issue (while with 6.0.44 it's working as expected). Do you want to further debug what has changed in the latest tomcat and causing the issue?
Btw, in #287 a quite similar issue is reported for the latest tomcat 7.0.68 - maybe both issues share the same root cause.
from memcached-session-manager.
@cnzzr @kimmob I think I found s.th.: tomcat guys decided to deprecate the Manager.maxInactiveInterval in a new patch version (the same for 7.0.68 and 6.0.45) and always just use the Context.getSessionTimeout()
(default session timeout). This explains the wrong/changed behaviour. Other Manager implementations from tomcat also still invoke Manager.setMaxInactiveInterval
, so it's not obvious what has to be changed.
Maybe you could investigate further why Manager.maxInactiveInterval was deprecated and what should be used instead to use the session timeout from the webapp/web.xml?
from memcached-session-manager.
Related:
apache/tomcat@8bc6fa5
apache/tomcat@7e8dcf3
from memcached-session-manager.
In tomcat 6 and tomcat 7 Manager.getMaxInactiveInterval is broken, while in tomcat 8 it's correct:
https://github.com/apache/tomcat60/blob/trunk/java/org/apache/catalina/session/ManagerBase.java#L596
https://github.com/apache/tomcat70/blob/trunk/java/org/apache/catalina/session/ManagerBase.java#L426
https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/session/ManagerBase.java#L427
Also had to tell this tomcat's twitter account ;-)
https://twitter.com/martin_grotzke/status/702110946035163136
https://twitter.com/martin_grotzke/status/702112668837142528
from memcached-session-manager.
@cnzzr The issue-48-sessionTimeout-tomcat6 now works for me, I'll release msm with the changes. If you can confirm that it works this would be great.
from memcached-session-manager.
D'oh, there are failing tests, and with the minutes based Context.sessionTimeout tests are running forever. Needs investigation / another solution.
from memcached-session-manager.
@cnzzr I just released 1.9.2 with the fix.
from memcached-session-manager.
Related Issues (20)
- Can I use multiple MemcachedConnection? HOT 1
- Cache node failover not working in AutoDiscovery mode (ElastiCache)
- Configuring memcached with Redis Cluster
- Connecting to "Secure" Redis HOT 1
- Does AutoDiscovery mode (Elasticache) as non-sticky save the sessions in multiple nodes?
- java.lang.NoSuchFieldException: parentOffset HOT 1
- expose threadpool metrics from BackupSessionService and LockingStrategy
- Support for session object serialization filters HOT 2
- Principal and other attributes need some flexibility with Serialization
- SSL support for redis HOT 1
- Dependency com.thoughtworks.xstream:xstream, leading to CVE problem HOT 1
- Support AuthType JASPIC
- DefaultTreeMode Serialization Problem
- Validity data and session data have mismatching TTL
- Custom principal from web application cannot be deserialized
- Tomcat error: com.couchbase.client.vbucket.provider.BucketConfigurationProvider: Could not parse config, retrying bootstrap HOT 3
- create link to successor project: redex-sm HOT 1
- Please consider support for tomcat 10.1 HOT 3
- Memcached Session Manager failing in multi-threaded environment
- Tomcat session does not persist for multiple tomcat pods with the Memcached session manager HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memcached-session-manager.