We are using tomcat 6.0.16 and we are facing memory issues with it. There is only one webapp and axis2 webservice deployed on the server. The server is having 6GB RAM and we are allocating heap space of 3GB to tomcat server but still its getting memory issues.
I am providing following java options in catalina.sh
I checked with the jconsole profiler and found that the memory increases to 3GB and then suddenly drops to 1.3-1.5GB and then again increases. The CPU usage, number of threads and classes are nearly constant.
We are suspecting that memory is not getting released continuously and thats why when it reaches to Max, its forcefully calling GC and releasing all the memory(nearly 1.5 GB)
Please look into the attached profiler screenshot for more details. Can anybody help me to resolve this issue?
Regards,
Pankaj
PankajKumar jaiswal
Greenhorn
Joined: Aug 13, 2006
Posts: 17
posted
0
I know that using profiler adds the extra overhead and the java options for that is added just temporarily to check the performance and find out the issue.
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
1
posted
0
OK, exactly what is the issue? Is it crashing? Causing long delays during GC?
Isn't this exactly the behavior you would expect with Java managed GC?
I am facing this exception when the server memory usage increases...
EVERE: Socket accept failed
java.net.SocketException: Too many open files
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)
at java.lang.Thread.run(Thread.java:619)
Oct 15, 2009 8:20:32 AM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
SEVERE: Socket accept failed
Anybody else faced this issue?
William Brogden
Author and all-around good cowpoke
Rancher