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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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
回答2:
IT just kill the request and break the request-response link. And you get..
Unable to connect
Browser can't establish a connection to the server at Host:port.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Browser is permitted to access the Web.
That can not be handled.