当tomcat停止时,请求会发生什么

时间:2012-06-22 10:33:05

标签: http tomcat servlets request

以“正常”方式停止或重新启动tomcat时正在处理的http请求会发生什么? 它们会被处理,直到响应完成或者http线程被中断了吗? 有没有办法配置优雅的停止?

2 个答案:

答案 0 :(得分:14)

Tomcat支持unloadDelay,它等待卸载servlet的配置时间。

这应在context.xml中配置如下:

<context unloadDelay="10000">

参考文献:

答案 1 :(得分:1)

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.

无法处理。

相关问题