https://issues.apache.org/bugzilla/show_bug.cgi?id=53173

--- Comment #6 from Konstantin Kolinko <knst.koli...@gmail.com> ---
(In reply to comment #5)
> Hi Filip.
> 
> Is it possible that this bugfix did not completely solve the problem?
> 
> When doing a load test I encountered a stuck tomcat 7.0.29 with all threads
> in socketRead0 and no thread handling the web application:
> 
>    java.lang.Thread.State: RUNNABLE
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:150)
>         at java.net.SocketInputStream.read(SocketInputStream.java:121)
>         at org.apache.coyote.ajp.AjpProcessor.read(AjpProcessor.java:309)
>         at
> org.apache.coyote.ajp.AjpProcessor.readMessage(AjpProcessor.java:364)

This one is busy reading data on an existing connection. (It is between
requests, so no web application classes are mentioned in the stack trace).

It is reading a socket. It cannot serve requests on other sockets. It cannot be
used for new requests.

> The Acceptor thread is stuck:
> 
> "ajp-bio-127.0.0.1-8009-Acceptor-0" daemon prio=10 tid=0x6eaf2800 nid=0x18ee
> waiting on condition [0x6e15c000]
>    java.lang.Thread.State: WAITING (parking)
>         at sun.misc.Unsafe.park(Native Method)
>         - parking to wait for  <0xa23cf128> (a
> org.apache.tomcat.util.threads.LimitLatch$Sync)
>         at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)

This one, yes, is waiting on the counter and would not accept any more request
until the counter goes down.

> with a very simple Connector configuration (all thread and connection
> parameters left to default).

> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

You are using the BIO connector implementation.

Which means (according to the configuration reference for AJP connectors):
maxThreads = 200
maxConnections = maxThreads

So if you have 200 working threads and all are busy "reading" (waiting for data
on existing socket),  then it is by design. You are not able to start 201th
thread, so there is no point in accepting the 201th connection.


Anyway, as was written earlier,
> Additional option added
> maxConnection=-1 to disable connection counting

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to