tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Long running socket reads
Date Fri, 14 Oct 2016 08:01:37 GMT
On 12/10/2016 16:22, Rallavagu wrote:
> Tomcat 7.0.70 - Sun JDK 1.7.0_80
> 
> I have following long running thread (almost 5 sec).

No you don't. That thread isn't doing it any work. It is blocking,
waiting for I/O.

> It appears to be reading data from socket

Sort of correct. It is waiting for data to arrive.

> (external resource potentially).

Wrong.

> Wonder how I
> could go about debug these kind of threads to understand which external
> resource is it spending more time on reading. Thank.

The stack trace contains class names and line numbers. The source code
is freely available. While the class names themselves provide a broad
hint as to what this thread is waiting for, you always have the option
of looking at the source code.

In this case start with these:
AbstractHttp11Processor line 994
Http11Processor         line 168

Mark

> 
> "http-bio-28080-exec-523" daemon prio=10 tid=0x00007fc5e403e000
> nid=0x3cbd runnable [0x00007fc51ce0d000]
>    java.lang.Thread.State: RUNNABLE
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:152)
>         at java.net.SocketInputStream.read(SocketInputStream.java:122)
>         at
> org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:516)
> 
>         at
> org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:501)
> 
>         at
> org.apache.coyote.http11.Http11Processor.setRequestLineReadTimeout(Http11Processor.java:168)
> 
>         at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:994)
> 
>         at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623)
> 
>         at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
> 
>         - locked <0x00000006e20ac9e8> (a
> org.apache.tomcat.util.net.SocketWrapper)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 
>         at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> 
>         at java.lang.Thread.run(Thread.java:745)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message