-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jesse,

On 12/22/16 10:41 AM, Jesse Barnum wrote:
> 
>> On Dec 22, 2016, at 10:39 AM, Christopher Schultz
>> <ch...@christopherschultz.net> wrote:
>> 
>> On 12/22/16 10:20 AM, Jesse Barnum wrote:
>>> I am running multiple webapps on Tomcat 7, and I’ve noticed
>>> that when shutting down Tomcat, the ContextListeners are called
>>> in serial, instead of in parallel. Some of these webapps take
>>> 5-15 seconds to run various shutdown procedures. This can
>>> exceed the timeout period for shutting down, which means that
>>> the orderly shutdown process can be skipped when there are more
>>> then 5 or 6 webapps.
>>> 
>>> I know one solution for this problem is to increase the
>>> shutdown timeout. However, is there a good reason to shutdown
>>> contexts in serial, rather than in parallel? That would solve
>>> the problem and prevent lengthy shutdowns, which in turn would
>>> reduce downtime for maintenance.
>> 
>> Which exact version of Tomcat 7 are you using?
> 
> Apache Tomcat/7.0.65
> 
> Has this changed in a newer version? I’m happy to update if that is
> the case.

There's 7.0.73 but it shouldn't make too much of a difference. I just
wanted to make sure you weren't running 7.0.1-RC or some weird thing
that's ages old.

In Tomcat 7 there is a setting on the <Engine> component called
"startStopThreads"[1]. The default is 1 which means that a single
thread will be used to start/stop applications during
startup/shutdown, so the behavior you are seeing is expected.

If you want to use more threads, then you'll need to add/adjust that
setting. Something like this:

server.xml
- ----------

 ...
   <Engine name="Catalina" defaultHost="localhost"
      startStopThreads="6">
   ...
   </Engine>
 ...

That setting should use 6 threads and start/stop all your applications
simultaneously.

- -chris

[1]
http://tomcat.apache.org/tomcat-7.0-doc/config/engine.html#Common_Attrib
utes
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYW//fAAoJEBzwKT+lPKRYtD8P/3J0c7Ky/CXfg/Iloc8XXNUX
6lYwXwq0eIjjsqjHzScIFbdITwe2wA+7Hnf1YPW75KUKXQlz2aZXeFPULjNEnD0b
IkShEYdHh6uJa/Zs0yOzNMlIvUYHynoG6kISl+UQdUKk6L2fCOEzqeA3ZzGg+W2v
V5Pa5ntDaQUynrSYmvYZ4v5jKkyrkhCppdnCA9FPTm+WEBEy7ApauiL2/Pu398cG
LDThVjK8PhpFZg5WQv7w+GPeZec8JjjBsWPd1PNocG+SymlCw+O0qAtWxb0xXRsB
xwkSD30XmKL7EJfqxyC4Np20rHxsNUqAxc7Qeq/hn2KQQLPkvadd41XjHVf6gWZo
hYDQyUKDpsk5WD5Lh9SHFlTQwO3iAOvOjjnQzJG+bCZl0QXcfWxm2bYWFfJHQB6s
VXeJRV8LwMAgJV87jYAosKLGizl8mx4URDFtrfImrx9PdXjpUyNVDYU+csofGVN/
axG8k8DeFVp2qOPeuJQ/Ad+30dO8Oi46voGPbXZKJV4nPRNN5RuSbFpXDdtfz34W
gUXE6IFi/veMN4nP1+dqKisBWPhttMwXDnvK/g3S43UE2dlVA7y2lS1xmjzY3XDP
GC+e/TUzRFhKG/XjeuiELWyDpTUqzHOGH8MWOKbjguNKjqyhnZdCfvt6OkK4Id+I
Z81o0uuQXlECeKcHZIdR
=bv8S
-----END PGP SIGNATURE-----

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

Reply via email to