- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的 tomcat 服务器持续处理某些请求超过 10 分钟。我停止了触发这些请求的客户端,但随后 tomcat 也继续处理这些请求。
我在 tomcat 的 server.xml
文件中尝试了 connectionTimeout
属性的不同设置,但它不起作用。
我想知道如何配置 tomcat,以便 tomcat 杀死/停止处理花费超过特定时间(如 10 秒或 1 分钟等)的请求。
最佳答案
来自 The Apache Tomcat Connector - Generic HowToTimeouts
JK can also use a timeout on request replies. This timeout does not measure the full processing time of the response. Instead it controls, how much time between consecutive response packets is allowed.
In most cases, this is what one actually wants. Consider for example long running downloads. You would not be able to set an effective global reply timeout, because downloads could last for many minutes. Most applications though have limited processing time before starting to return the response. For those applications you could set an explicit reply timeout. Applications that do not harmonise with reply timeouts are batch type applications, data warehouse and reporting applications which are expected to observe long processing times.
If JK aborts waiting for a response, because a reply timeout fired, there is no way to stop processing on the backend. Although you free processing resources in your web server, the request will continue to run on the backend - without any way to send back a result once the reply timeout fired.
关于java - 如何在一定时间后停止tomcat处理请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30573112/
我正在尝试开发右边框/Angular 具有特定 Angular (30°) 的表格。我见过一些类似的解决方案,但它们都无法在一定程度上发挥作用。如果我想从 30° 改变到 20°,我不想花太多力气。
我是一名优秀的程序员,十分优秀!