On 7 May 2014 17:37, "devoss ind" <devoss....@gmail.com> wrote:
>
> Hi,
>
> Am using tomcat 6, java6 in production environment to run our web
application. We found that recently, cpu in top is showing 100% nearly.
Then we dig into each thread cpu usage by -H option in top. We found only
one thread is taking 100%usage and identified the thread using thread dump.
The thread dump for that particular thread which is using 100% usage is as
follows...
>
> "http-8080-exec-3687" daemon prio=10 tid=0x7336f400 nid=0x41a1 runnable
[0x619ad000..0x619ade30]
> java.lang.Thread.State: RUNNABLE
> at
org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:616)
> - locked <0x967b22f0> (a
org.apache.coyote.http11.InternalNioOutputBuffer)
> at
org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:608)
> at
org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:1024)
> at org.apache.coyote.Response.action(Response.java:183)
> at org.apache.coyote.Response.sendHeaders(Response.java:379)
> at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305)
> at
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
> at
org.apache.catalina.connector.Response.flushBuffer(Response.java:548)
> at
org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:345)
> at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
> at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> at
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
> at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
> at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
> at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
>
> We can see that above thread is locked due to some problem in NIO.
>
> We have verified in tomcat manager also for such thread. We found that a
particular thread is taking 14140517ms time and the request in that line is
of POST request which is not related to our application.
>
> That particular thread is not releasing till we restart tomcat.
>
> This is happening frequently.
>
> Please help me to find out the root cause of this problem. How to avoid
restarts.
>
> Our server.xml connector configuration is as follows...
>
> <Connector port="${http.port}"
protocol="org.apache.coyote.http11.Http11NioProtocol"
> connectionTimeout="5000"
> acceptCount="1500"
> maxThreads="10000"
> redirectPort="8443" />
>
> Please help in this thread locking problem.
>