We are looking to implement in memory session replication. Before we do that our main concern is how the session objects will use the memory? and if session get large after some time will get out of memory error so how to overcome this other than increasing the memory size?
if anybody get into these please reply me.., Thanks in advance.
We are looking to implement in memory session replication. Before we do that our
Share
One thing you can do is limiting the number of active sessions (maxActiveSessions): http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html#Common_Attributes – so you can limit the memory used by sessions.
Another option is to use non-sticky sessions so that there are only as much sessions concurrently stored in memory as there are concurrent requests. Not sure about the details of the tomcat integrated replication of with non-sticky sessions, but at least memcached-session-manager can manage them (I must mention that I’m the author of this lib). It also provides jmx statistics that allow you to inspect the session memory size.