简体   繁体   English

Apache会杀死长时间运行的页面请求线程吗?

[英]Will Apache kill long-running page request threads?

I have a Spring web application running in Oracle Application Server, which is based on Apache. 我在基于Apache的Oracle Application Server中运行一个Spring Web应用程序。 I'm afraid I don't know which component this question might apply to. 恐怕我不知道这个问题可能适用于哪个组件。

My question is - will threads from the connection pool ever be forcibly killed? 我的问题是-连接池中的线程是否会被强制杀死? On rare occasions, a page request can take much longer than usual. 在极少数情况下,页面请求可能比平时花费更长的时间。 Can a page request ever take so long that Apache will simply stop the thread without notice? 页面请求是否可以花很长时间以至于Apache会在没有通知的情况下简单地停止线程?

If so, what settings define the timeout? 如果是这样,什么设置定义超时?

To give this some context, I'm locking resources for the duration of the page generation, and I want to ensure that all locks are released. 为了提供一些上下文信息,我在页面生成期间锁定资源,并且我想确保释放所有锁。 I'm not concerned about HTTP timeouts - just that locks are released. 我不担心HTTP超时-只是释放了锁。

From my understanding, apache httpd server do have request timeout and the browser do have request timeout. 据我了解,apache httpd服务器确实有请求超时,而浏览器确实有请求超时。 Proxies do have timeout and will kill too long HTTP requests. 代理确实有超时,将杀死太长的HTTP请求。 DB Pools can be configured to have also request timeout but it should not by default (depend of configuration). 可以将数据库池配置为也具有请求超时,但是默认情况下不应设置超时(取决于配置)。 Nobody will kill the thread through, it is just they will stop waiting for the response. 没有人会杀死线程,只是他们将停止等待响应。

For the browser or any intermediary proxy, you can't change it excepted if you know exactly your final environement, and can control their configuration. 对于浏览器或任何中间代理,除非您确切了解最终环境,并且可以控制它们的配置,否则不能更改它。

For apache httpd server, just go see the apache documentation. 对于apache httpd服务器,只需查看apache文档即可。 For your DB pool, go check your pool configuration. 对于您的数据库池,请检查您的池配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM