You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2022/06/23 14:17:22 UTC

[Bug 66142] New: Encounter "ejectedExecutionException: Queue capacity is full" when #busy thread is less than minSpareThreads

https://bz.apache.org/bugzilla/show_bug.cgi?id=66142

            Bug ID: 66142
           Summary: Encounter "ejectedExecutionException: Queue capacity
                    is full" when #busy thread is less than
                    minSpareThreads
           Product: Tomcat 8
           Version: 8.5.76
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: eddie.wu@sap.com
  Target Milestone: ----

Created attachment 38326
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38326&action=edit
number of busy thread vs total threads.

The setup: 
<Executor name="tomcatThreadPool" namePrefix="exec-" maxThreads="100"
minSpareThreads="50" maxQueueSize="50" />

Warning and call stack when issue happened:
WARN  [NioEndpoint] [][]Executor rejected socket
[org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@1c14500a:org.apache.tomcat.util.net.NioChannel@6279c985:java.nio.channels.SocketChannel
[connected local=/xxx:xx remote=/xxx:xx]] for processing
java.util.concurrent.RejectedExecutionException: Queue capacity is full
        at
org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1413)
        at
org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1376)
        at
org.apache.catalina.core.StandardThreadExecutor.execute(StandardThreadExecutor.java:174)

but according to Zabbix monitoring (refer to attached screenshot):
number of busy threads never exceeds 29.

suspect there is potential issue inside thread pool.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66142] Encounter "ejectedExecutionException: Queue capacity is full" when #busy thread is less than minSpareThreads

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66142

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Monitoring tools use polling. The maximum value observed is not necessarily the
actual maximum.

If a traffic spike occurs then it is perfectly possible for requests to be
rejected with a queue that small.

If there was an issue (i.e. a leak in the thread busy counter), I'd expect to
see the threads busy metric rising slower over time. That isn't happening.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org