• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

memory for user sessions always increasing?

 
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic