-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ashish,
On 9/9/2011 10:22 AM, Ashish Kulkarni wrote: > What do you mean it will slow down? Tomcat's JDBC-based session store serializes session objects in order to save them. Serialization takes time. Ergo, using an in-memory database will be slower than simply using plain-old memory to store objects. > We have an application which saves about 5 MB of data in session > when user is working with some portion of application, so when > about 200 users login we go about 1 GB of ram and Tomcat starts > running out of heap memory, as all the session data goes in heap > memory, > > So i was hoping if i can persist the data in database, then i can > free up some heap memory from tomcat. Er... you're asking if an in-memory database can free-up memory? > Will this work? or tomcat will have session in Heap Memory only > even if i prefer to persist to write it in database If you don't want the data taking up memory on your app server, you have two options: 1. Write to on-disk database 2. Write to remote, in-memory database Honestly, if you're going to go to a database, you may as well make it a durable (that is, not in-memory) one. Some folks around here use memcached as a session-backing system. You might want to look into doing that. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5qhp0ACgkQ9CaO5/Lv0PD/4ACfSoe14yhhON08A3J6gG5AXUzD fioAoIbxANtX/uLlfT/0sw+pt4659wen =/sti -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org