On 27/08/2024 21:41, Christopher Schultz wrote:
Quoc,
On 8/27/24 14:58, Quoc Nguyen wrote:
Apache Tomcat version: 9.0.90 and above
OS: Windows Server 2019
Tomcat Version Used Time Taken to stop
Apache Tomcat/8.5.66 ~ 9 seconds
Apache Tomcat/9.0.1 ~ 9 seconds
Apache Tomcat/9.0.10 ~ 9 seconds
Apache Tomcat/9.0.13 ~ 9 seconds
Apache Tomcat/9.0.14 ~ 1 min 3 secs
Apache Tomcat/9.0.16 ~ 1 min 3 secs
Apache Tomcat/9.0.20 ~ 1 min 3 secs
Apache Tomcat/9.0.30 ~ 1 min 3 secs
Apache Tomcat/9.0.40 ~ 1 min 3 secs
Apache Tomcat/9.0.44 ~ 1 min 3 secs
Apache Tomcat/9.0.46 ~ 1 min 3 secs
Apache Tomcat/9.0.75 ~ 1 min 3 secs
Apache Tomcat/9.0.89 ~ 1 min 3 secs
Apache Tomcat/9.0.90 ~ 1 min 3 secs
Apache Tomcat/9.0.93 ~ 1 min 3 secs
From Tomcat changelog
(https://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.14_(markt): Version 9.0.14 "Add a scheduled executor to the Server, which can be used to process periodic utility tasks. The utility threads are non daemon by default. (remm)", which has the default timeout of 60s for procrun.
Workaround: to reduce the default timeout of 60s, I can supply it via
Tomcat Monitor (Tomcat9w.exe) or while creating the Windows service.
This workaround has worked up to version 9.0.89 and has stopped for
version 9.0.90 and above. The difference is version 9.0.89 and lower
uses Apache Commons Daemon procrun (1.3.x.0 64-bit) whereas version
9.0.90 and above uses Apache Commons Daemon procrun (1.4.0.0 64-bit).
Questions:
1) Am I on the right rack with this procrun timeout?
No.
2) If #1 is yes, does the upgrade from Apache Commons Daemon procrun
(1.3.x.0 64-bit) to Apache Commons Daemon procrun (1.4.0.0 64-bit)
cause the supplied timeout to be ignored so that the default of 60s is
always in effect?
2) If #2 is yes, is there a workaround while waiting for a fix or must
wait for a fix?
Since this symptom lasts for more than a minute and (I assume) is
trivially reproducible, you should take a thread dump to find out what
Tomcat is doing during that time.
It is unlikely to be Tomcat. A clean Tomcat 9.0.93 install stops in
around 1 second. It will be something the application is doing. Probably
with a non-daemon thread or maybe a long running request.
+1 to the thread dump suggestion.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org