【发布时间】:2012-06-24 15:42:06
【问题描述】:
当您以“正常”方式停止或重新启动 tomcat 时,正在处理的 http 请求会发生什么情况? 它们会被处理直到响应完成还是http线程被中断? 有没有办法配置优雅停止?
【问题讨论】:
标签: http tomcat servlets request
当您以“正常”方式停止或重新启动 tomcat 时,正在处理的 http 请求会发生什么情况? 它们会被处理直到响应完成还是http线程被中断? 有没有办法配置优雅停止?
【问题讨论】:
标签: http tomcat servlets request
Tomcat 支持unloadDelay,它会等待配置的时间来卸载 servlet。
这应该在context.xml中配置如下:
<context unloadDelay="10000">
参考资料:
【讨论】:
它只是终止请求并断开请求-响应链接。你得到了..
无法连接
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.
这无法处理。
【讨论】: