William,

On 3/24/25 2:56 PM, William Crowell wrote:
I am running Apache Tomcat 9.0.97 on Windows Server 2022.  I’m running Oracle 
JDK 1.8.0_371-b11 with a 4GB min heap and a 16GB max heap.

I have an application deployed on this server that is hitting an Oracle 
database server.  I have noticed the server stops accepting requests after 
about 8-12 hours of uptime.  In JProfiler you can tell when this is about to 
happen because 20 of the 150 NIO threads BRIEFLY…BRIEFLY go into a blocked 
state while querying the database.  After this situation clears up, the NIO 
thread pool grows slightly by about 15-20 threads, and then the application 
server stops serving requests.

I looked at the GC log, and it looks completely healthy, and we are not even 
close to our max heap.  Metaspace size is not configured, but it looks fine 
from the GC logs.  There is no crash file or core dump produced.

I do notice some Oracle exceptions in the logs when this happens.  We do have 
about 1000 max connections defined on the Oracle database (which is too many).

Are you able to use JMX or similar to see how many used database connections you have?

When you say that Tomcat does not accept requests, do you mean that you make a request and it never returns, or do you mean that you get a "connection refused" or something similar?

I have my thread pool defined as follows in server.xml:

…
      <Executor name="tomcatThreadPool"
           namePrefix="catalina-exec-"
           maxThreads="1000"
           minSpareThreads="50"
           maxIdleTime="60000"
           maxQueueSize="1000" />

      <Connector port="8080"
            protocol="org.apache.coyote.http11.Http11NioProtocol"
            connectionTimeout="130000"
            redirectPort="8443"
            disableUploadTimeout="false"
            acceptCount="1000"
            maxConnections="1000"
            executor="tomcatThreadPool" />

Have you tried enabling any of the "abandoned"-related settings? I highly recommend logAbandoned="true" and possibly others.

I would imagine you'd see threads waiting on database connections if you had exhausted your pool. Just remember that threads can be stuck on things without being BLOCKED.

> Are there any logs I can enable to find out why the application server stops accepting connections?

-chris


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

Reply via email to