G,

But, when I close down a client window, the
memory consumption remains at it's peak (and climbs with each
successive new client opened) In other words, memory consumption
increments but never decrements, necessitating a server bounce at
unacceptable frequency.

What is your definition of 'never'?

Java cannot immediately reclaim the memory used by that user's sesson if the user closes the browser. Tomcat doesn't know that the client has closed their browser. It must wait until the session times out (30 minutes, I think) before the session can be cleaned up automatically. Solutions?

1. Reduce the session timeout.
2. Store less stuff in the session so that it's not such a memory drain.
3. Beg your customers to logout before leaving your app. ;)

Why are the resources not being reclaimed, and how might I gently
encourage resource reclamation? I fear System.gc() is not the answer
here.

System.gc only tells the GC 'now might be a convenient time to run the GC'. Other than that, it's not much good.

-chris


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to