当您以“正常”的方式停止或重新启动Tomcat时,正在处理的HTTP请求会发生什么情况?它们会一直处理直到响应完成,还是HTTP线程会被中断?是否有一种配置优雅停止的方法?
Tomcat支持unloadDelay
,它会在配置的时间内等待卸载servlet。
这应该在context.xml
中进行如下配置:
<context unloadDelay="10000">
参考资料:
IT只是终止请求并断开请求-响应链接。然后你会得到...
无法连接
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.
无法处理。