Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

memory for user sessions always increasing?

 
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...
 
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
 
Could you hold this puppy for a sec? I need to adjust this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic