• Post Reply Bookmark Topic Watch Topic
  • New Topic

memory for user sessions always increasing?  RSS feed

 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to figure out if memory used by sessions (e.g. session beans) ever gets recovered, or if that doesn't happen until my app server (in my case, Tomcat) gets restarted (or until the system crashes?). All I know is that every time a user logs into the site, new session beans get instantiated, and I don't see how they'd ever get disposed of if the users don't explicitly send a request to the server to log out (if they just close their browser, the server wouldn't know that). So it seems like memory usage should just go up and up...or does Tomcat somehow convince Windows to stick some things that are in memory into virtual memory so that not so much of the physical memory is in use? Am I missing something big here?

The website I currently maintain has thousands of users--maybe not that memory is required for a few session beans per user. I tried to get a straight answer out of the original developer of the site, but he's usually unresponsive to me unless we have an emergency! I'm trying to catch up on my gaps in J2EE knowledge in the meantime...
 
Derek Clarkson
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I'm no guru on this, but I understand that each session has a timeout. Which means that once the user has not done anything for a period greater than this amount, the session is wiped and presumably all memory recovered. The only way that you should get a memory leak would be if you've set the server to unlimited time on the timeout setting.

ciao
D
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!