Giter VIP home page Giter VIP logo

Comments (19)

 avatar commented on July 25, 2024

From [email protected] on May 08, 2009 20:40:59

See
http://github.com/jhriggs/memcached-session-manager/commit/ba8e9655e13082e549ed4794ad1196121b6ba16e

from memcached-session-manager.

 avatar commented on July 25, 2024

From martin.grotzke on May 09, 2009 16:15:35

Thanx for fixing this, this is merged now.

Status: Fixed

from memcached-session-manager.

cnzzr avatar cnzzr commented on July 25, 2024

memcached-session-manager-1.9.1.jar with session-timeout mistake!

@marcust

from memcached-session-manager.

magro avatar magro commented on July 25, 2024

@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.

cnzzr avatar cnzzr commented on July 25, 2024

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
20160218

from memcached-session-manager.

magro avatar magro commented on July 25, 2024

Ok, I need to reproduce this.

from memcached-session-manager.

magro avatar magro commented on July 25, 2024

@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.

cnzzr avatar cnzzr commented on July 25, 2024

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.

magro avatar magro commented on July 25, 2024

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.

cnzzr avatar cnzzr commented on July 25, 2024

tomcat6.0.37 with jdk6

  • session.getMaxInactiveInterval(): 180

@magro

from memcached-session-manager.

magro avatar magro commented on July 25, 2024

@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.

cnzzr avatar cnzzr commented on July 25, 2024

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.

magro avatar magro commented on July 25, 2024

@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.

magro avatar magro commented on July 25, 2024

@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.

magro avatar magro commented on July 25, 2024

Related:
apache/tomcat@8bc6fa5
apache/tomcat@7e8dcf3

from memcached-session-manager.

magro avatar magro commented on July 25, 2024

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.

magro avatar magro commented on July 25, 2024

@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.

magro avatar magro commented on July 25, 2024

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.

magro avatar magro commented on July 25, 2024

@cnzzr I just released 1.9.2 with the fix.

from memcached-session-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.