<Context path="" docBase="" debug="0" reloadable="false"
allowLinking="true" workDir="/usr/local/tomcatwork">
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n1:memcached1:11211 n2:memcached2:11211
n3:memcached3:11211 n4:memcached4:11211"
maxActiveSessions="25000"
maxInactiveInterval="900"
requestUriIgnorePattern=".*\.(png|gif|jpg|css|js)$"
/>
Is it possible to change these? If so, what is the correct method?
Thanks,
Christopher Tiwald
the maxActiveSessions should be configurable like in your configuration,
I also just checked this and it works. If it does not for you we have to
dig deeper.
I also just checked the maxInactiveInterval setting and saw that it's
overwritten (in manager.setContainer(Context), which is called after
setMaxInactiveInterval) with the session timeout value. The
implementation in msm does the same as the stock tomcat StandardManager.
To achive what you want you should configure the session-timeout in your
web.xml.
If you'd really prefer to set the maxInactiveInterval in your manager
configuration I (we) could discuss this with the tomcat devs.
Cheers,
Martin
> The
> number of sessions appears to monotonically increase. At least I
> haven't noticed it drop during this ramp up period. Similarly, the
> number of loaded classes increases monotonically.
> 3) After 2 hours, the total number of activeSessions stabilizes.
> Thousands of classes are unloaded every MarkSweep GC, and the machine
> stays stable.
>
> The total loaded classes and memory footprint of the JVM process
> generally seem pegged to the number of activeSessions, a behavior that
> wasn't as obvious on tomcat 6.0.18 running an identical copy of the
> application. To test, I've been trying to bring about that stabilizing
> point earlier. I thought I might be able to by reducing
> maxInactiveInterval (which appears to be 2 hrs by default).
Default session timout is 30 minutes (in StandardContext: private int
sessionTimeout = 30;).
If your sessions time out after 2 hours instead of 30 minutes there's
s.th. wrong with your setup.
The number of loaded classes increasing together with the number of
active sessions sounds weird (also unloading of thousands of classes).
Do you know / can you find out which classes are unloaded?
Does this also happen, when you don't use jconsole or stuff (see
http://stackoverflow.com/questions/3873635/java-concurrentmarksweep-garbage-collector-not-removing-all-garbage)?
Have the latest jvm and tomcat versions running?
Do you experience the same also without msm=
> In
> retrospect, that sounds like the wrong thing to configure. I think I'm
> just trying to increase the expiration rate, but am not quite sure how
> to go about doing it.
First I'd try to find out why the number of active sessions and loaded
classes is increasing that much.
Cheers,
Martin