Hi All, 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.
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(); } 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. 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. Chirag