You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by smarto <sm...@web.de> on 2011/07/20 18:35:32 UTC

Destroyed sessions without timeout or logout

Hi,

my SessionListener logs the creation and destruction of sessions.

Recently and only sometimes it shows the destruction without any
senseful reason:

0. Session timeout is set to 10 minutes.

1. The servlet doesn't call HttpSessions invalidate.

2. The logged inactivity interval is << 10 Minutes (i got logs with 4 
millis and 200 millis inactivity^^)

Environment: SuSE SLES 11 SP1, tomcat 6.0.18, ibm java 1.6.0, patches 
are uptodate

This behavior isn't really reproducible. Sometime it happens in every 
second up to 10th request but most of the time not ( i ran 
selenium-tests with 2000 requests over and over again without
any problem).

I tried to log tomcats session handling with logging.properties as follows:
   org.apache.catalina.session.level = ALL
   org.apache.catalina.session.handlers = 
2localhost.org.apache.juli.FileHandler

I only get some FINE-loggings a la:
- "org.apache.catalina.session.ManagerBase processExpires"
- "End expire sessions StandardManager ...".

I don't get a glue about the reason or the source of the session 
destruction. Is there a way to get more logs for thoses events?

BTW: Today i noticed log entries from different threads for a single 
destroy-event! They happened within 1-2millis interval...

I appreciate any help. Thanks in advance,

Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Destroyed sessions without timeout or logout

Posted by smarto <sm...@web.de>.
Thanks Rainer,

yea, the stracktrace is helpful ;) .... it was my first thought, to call 
the stacktrace.
But i withdraw it, because my guess was, that the
events and there stacktrace are "decoupled". I didn't even try it ... 
bad mistake

Best regards,

Martin




> On 20.07.2011 18:35, smarto wrote:
>> Hi,
>>
>> my SessionListener logs the creation and destruction of sessions.
> Then add logging the code stack and you will get an idea, where the
> invalidate originated. Something like
>
> log.info("Session destryoes"); changes to
> log.info("Session destroyed", new Throwable("Stack));
>
> Regards,
>
> Rainer
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Destroyed sessions without timeout or logout

Posted by Rainer Jung <ra...@kippdata.de>.
On 20.07.2011 18:35, smarto wrote:
> Hi,
> 
> my SessionListener logs the creation and destruction of sessions.

Then add logging the code stack and you will get an idea, where the
invalidate originated. Something like

log.info("Session destryoes"); changes to
log.info("Session destroyed", new Throwable("Stack));

Regards,

Rainer

> Recently and only sometimes it shows the destruction without any
> senseful reason:
> 
> 0. Session timeout is set to 10 minutes.
> 
> 1. The servlet doesn't call HttpSessions invalidate.
> 
> 2. The logged inactivity interval is << 10 Minutes (i got logs with 4
> millis and 200 millis inactivity^^)
> 
> Environment: SuSE SLES 11 SP1, tomcat 6.0.18, ibm java 1.6.0, patches
> are uptodate
> 
> This behavior isn't really reproducible. Sometime it happens in every
> second up to 10th request but most of the time not ( i ran
> selenium-tests with 2000 requests over and over again without
> any problem).
> 
> I tried to log tomcats session handling with logging.properties as follows:
>   org.apache.catalina.session.level = ALL
>   org.apache.catalina.session.handlers =
> 2localhost.org.apache.juli.FileHandler
> 
> I only get some FINE-loggings a la:
> - "org.apache.catalina.session.ManagerBase processExpires"
> - "End expire sessions StandardManager ...".
> 
> I don't get a glue about the reason or the source of the session
> destruction. Is there a way to get more logs for thoses events?
> 
> BTW: Today i noticed log entries from different threads for a single
> destroy-event! They happened within 1-2millis interval...
> 
> I appreciate any help. Thanks in advance,
> 
> Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org