You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Narendra Sharma <na...@gmail.com> on 2010/10/04 10:59:11 UTC

Unclosed session detected. The session was opened here

I see few of these exception in our log after a long duration test run.
"Unclosed session detected. The session was opened here
<StackTrace>
"

I have following questions:
1. What does this exception mean?
2. Is it harmful?
3. Can this result in abrupt session close and operation failure?
4. What triggers this exception?
5. I use a Session cache which holds and reuses session for same user
operations. Two different users don't share the same session. The session
may be live for long duration (few minutes) if user keep performing
operations. Could this use case result into this exception?

Thanks,
Naren

Re: Unclosed session detected. The session was opened here

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Mon, Oct 4, 2010 at 10:59 AM, Narendra Sharma
<na...@gmail.com> wrote:
> 1. What does this exception mean?

This warnings is logged when the JVM reclaims an unreferenced Session
as garbage. It signals a code path that opens a new session but then
forgets to properly close once the session is no longer used. The
included stack trace is meant to help locate the troublesome code
path.

> 2. Is it harmful?

Jackrabbit will automatically close the stray session in such cases,
so the only real harm done is that the unclosed session has
unnecessarily tied up system resources that could have been released
already before.

> 3. Can this result in abrupt session close and operation failure?

No. The session is only automatically closed once the JVM reclaims it
as garbage, i.e. once there are no other references to the session.

> 4. What triggers this exception?

Garbage collection.

> 5. I use a Session cache which holds and reuses session for same user
> operations. Two different users don't share the same session. The session
> may be live for long duration (few minutes) if user keep performing
> operations. Could this use case result into this exception?

Only if your Session cache leaks.

BR,

Jukka Zitting