kjartanr
27-09-2010, 09:49
We have a web application using CometProcessor for reverse ajax. It is configured with the following NIO connector definition:
<Connector acceptorThreadCount="2" connectionTimeout="20000"
maxThreads="150" port="8080"
protocol="org.apache.coyote.http11.Http11NioProtocol"
redirectPort="8443" socket.directBuffer="false"/>
We have experienced two situations where tomcat stopped responding to requests and reported about memory issues in the log:
java.lang.OutOfMemoryError: Java heap space
The memory usage reported for the process with prstat and in tomcat monitor seems to be stable:
Free memory: 69.31 MB Total memory: 790.81 MB Max memory: 913.37 MB
Max threads is defined to 150 in the connector. Current thread count in Tomcat manager for the connector is reported to be 0:
Max threads: 150 Current thread count: 0 Current thread busy: 0 Keeped alive sockets count: 151
Max processing time: 66519 ms Processing time: 86568.63 s Request count: 1008318 Error count: 240 Bytes received: 69.61 MB Bytes sent: 234.96 MB
However we see in the list of threads for the connector below the summary (still in Tomcat manager) that the number of entries are constantly increasing, after a day of production we have apporx. 5000 entries, each entry looking like this:
R ? ? ? ? ? ?
Do you think that tomcat is actually using this many threads, or could this be a bug/weekness in Tomcat manager? Could it be that the use of CometProcessor is somehow fooling Tomcat Manager here?
The installation don't have more then approx 200 simultaneous clients connected using comet.
Thanks in advance for any help here!
Best Regards
Kjartan
<Connector acceptorThreadCount="2" connectionTimeout="20000"
maxThreads="150" port="8080"
protocol="org.apache.coyote.http11.Http11NioProtocol"
redirectPort="8443" socket.directBuffer="false"/>
We have experienced two situations where tomcat stopped responding to requests and reported about memory issues in the log:
java.lang.OutOfMemoryError: Java heap space
The memory usage reported for the process with prstat and in tomcat monitor seems to be stable:
Free memory: 69.31 MB Total memory: 790.81 MB Max memory: 913.37 MB
Max threads is defined to 150 in the connector. Current thread count in Tomcat manager for the connector is reported to be 0:
Max threads: 150 Current thread count: 0 Current thread busy: 0 Keeped alive sockets count: 151
Max processing time: 66519 ms Processing time: 86568.63 s Request count: 1008318 Error count: 240 Bytes received: 69.61 MB Bytes sent: 234.96 MB
However we see in the list of threads for the connector below the summary (still in Tomcat manager) that the number of entries are constantly increasing, after a day of production we have apporx. 5000 entries, each entry looking like this:
R ? ? ? ? ? ?
Do you think that tomcat is actually using this many threads, or could this be a bug/weekness in Tomcat manager? Could it be that the use of CometProcessor is somehow fooling Tomcat Manager here?
The installation don't have more then approx 200 simultaneous clients connected using comet.
Thanks in advance for any help here!
Best Regards
Kjartan