-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Chirag,
On 6/12/13 1:01 AM, Chirag Dewan wrote: > I am facing an Out of Memory Issue with my application. I am using > Embedded Tomcat 6.0.18. I have a simple servlet deployed which > does nothing but set the HTTPResponse and return it. Are you sure you don't trigger session creation? > Now I have 2 testing clients > > Client 1: > > HTTPClient 3.1 with MultiThreadedHttpConnectionManager with SSL > maxConnections = 200 maxConnectionsPerHost=200 > > Client 2: > > HTTPClient 4.1 in which I configured multiple threads > > for (int i = 0; i < noofConnections; i++) { Thread t = new > Thread(my); t.start(); } What is noofConnections set to? > With every thread executing HTTPGet on the servlet. This too with > SSL. > > > Now with client 1,my JVM crashes after just a few minutes. Running > with 8gb heap space. > > > I took a heap dump for 2gb heap space using Jmap and analyzed it > with MAT. It seems that there were many instances of > org.apache.catalina.session.StandardManager consuming almost 95% of > heap space. There should only be one StandardManager present per web application deployed. You only have a single web application? Are you sure that you have many StandardManager instances, or do you have a single StandardManager with a huge number of sessions? > CPU utilization is only 13 -14% and I can see only 65 threads > active with netstat. > > > With Client 2,everything looks fine. Though JVM crashes at 2gb,but > at 8gb it works fine. Though CPU utilization is almost 90% and 100 > simultaneous threads created for 100 simultaneous threads. > > Both my server and clients are on Linux 64 bit machines. > > I believe that this is something related to the client 1 i.e. > either the HTTPClient 3.1 or the MultiThreadedConnectionManager,but > posting here if someone can assist me in what might be the root > cause. Try a single thread and a single connection. Take a packet-capture and see what the response headers look like. I wouldn't be surprised if you are generating a new session with each and every request. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRuIlpAAoJEBzwKT+lPKRYjo4P/2S+89ycBzPTnxonur/aTUxm 0ZIHWHsDbKlg7YRlMlvpcPGuyXniW9mDOw5wWajt4WSCmcWNDEfI3bIIAI139lkw EeEFIVplkK/ZY2uLViJ0B4V9A/kBB7qkGDNPPubeNnhpi6gVGl+j3jB1S9aHOT9t dmLGavG1j1pRtAUTItr1kVKAegyaYCSlwbDe8YQefRF8+N/DyAi3wutSdoOpGYMA WytWWW4QvnFCZF3BcS13AhMgcPM/j81tQUtfnjLDIjV4KmAZwoF8i/4ZE21+Twl6 XfrFQve4DK+AhjGfqkobGKm1AlUycqI+8BGKbjEhtcOAmavfQDVtuV90Ahmb2gWd 9tNEf/EhQZuQcX5Gqg3WI7Ut7gz/9/f5i4P+1MN6AwwDTt7EJ0yl975+4eaziBaw en53fE4mPIB71r5DrCIEJ2nNHWTz5bQTIuv58wMKRGtetxZbqjdOuaBY8Pnrw73b kkPcQxgzA/CxWUxbKjnMuCHFz7eKAPaukytkSnIxWcqwftesNU2WvUgNsuhXpNnI Bp4BxV+B669FTtlRZrlCj6U2+1SgJzgWy9ZH3IzANsgVs4nUmHROiD7ZM9HLU+8m XnqOwcTcubG1eJq0vjYtpOs1hCsQwORTJS0CQhwH0WHVH3h+n9evnnkTAu0DB8++ yKwZFsmuD2oSjeLHOgWK =FOAt -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org