• 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

server's limitation on number of sessions ?

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does each application server have a vendor specific limit on how many HttpSessions it can handle at a given moment ? Any idea what's the limit for Tomcat ?
thanks.
 
Sheriff
Posts: 67748
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not believe that Tomcat, or other servlet containers, impose any artificial limits on the number of active session other than that dictated by the limitations of resources (such as available memory).
 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yea i agree with Bear...

the number of sessions would not be a fixed number, but depend on the resources available.

For example: if in an application, the session needs to store only one StringBuffer object then we may be able to store many sessions, but if the session were to store many more 'big' objects, in that case, memory would be required to store those objects, thus reducing the total number of objects to be stored...
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Servlet containers are allowed to Serialize sessions to disk or other storage so they do NOT have to keep all active sessions in memory. Thats why you should ensure that all objects "stored" in sessionss should implement Serializable.
Bill
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by William Brogden:
Servlet containers are allowed to Serialize sessions to disk or other storage so they do NOT have to keep all active sessions in memory. Thats why you should ensure that all objects "stored" in sessionss should implement Serializable.
Bill



How about HttpRequest ? will there be any chance that requests are serialized to disk ? I guess not, but not sure. Please confirm if you know the answer.

By the way, sessions are first stored in memory so it consumes memory. Where are "requests" stored ? Do they also eat memory ?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frank Sikuluzu:


How about HttpRequest ? will there be any chance that requests are serialized to disk ? I guess not, but not sure. Please confirm if you know the answer.

By the way, sessions are first stored in memory so it consumes memory. Where are "requests" stored ? Do they also eat memory ?



Requests do not get serialized to disk.
They only last a fraction of a second (except in fringe cases).

Because of the transient nature of requests containers often pool and recycle request objects to cut down on object creation.


Look for "recycle":
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java?view=markup
[ June 22, 2005: Message edited by: Ben Souther ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic