Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens to requests when tomcat stops

What happens to http requests that are being processed when you stop or restart tomcat in the "normal" way? Will they be processed until the response is finished or are the http-threads interrupted? Is there a way to configure graceful stopping?

like image 425
realsim Avatar asked Jun 22 '12 10:06

realsim


1 Answers

Tomcat supports unloadDelay which waits till the configured time for unloading servlets.

This should configured in context.xml as follows:

<context unloadDelay="10000">

References:

  • Context Config guide
  • Tomcat unloadDelay attribute
like image 174
Ramesh PVK Avatar answered Sep 18 '22 13:09

Ramesh PVK