Java (70007) 指定的超时已过期:代理:从远程服务器读取状态行时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21964316/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
(70007)The timeout specified has expired: proxy: error reading status line from remote server
提问by Papou
I have this error in my apache acces log.
我的 apache 访问日志中有此错误。
I work with apache 2.2 and tomcat 7. In the access file i see that apache send request to tomcat but tomcat can't treat them all. And when the error occures, i must restart tomcat to make my application work.
我使用 apache 2.2 和 tomcat 7。在访问文件中,我看到 apache 向 tomcat 发送请求,但 tomcat 无法处理它们。当错误发生时,我必须重新启动 tomcat 才能使我的应用程序工作。
I have 2 j2ee applications application on tomcat. That application use connexion to posgres database via jdbc connexion pool. I see in my application log their is at least 4 free connexions. So i don't think there is trouble with database.
我在 tomcat 上有 2 个 j2ee 应用程序。该应用程序通过 jdbc 连接池使用连接到 posgres 数据库。我在我的应用程序日志中看到他们至少有 4 个免费连接。所以我不认为数据库有问题。
Does someone know what could cause this error ? Thank you in advence !
有人知道是什么导致了这个错误吗?提前谢谢你!
回答by Med Ali Difallah
It seems that your application take more time to respond that apache ProxyTimeout ProxyTimeouttry to increase proxytimeout in you vhost/httpd configuration and try again The root cause is slowness in you application. you need to find the root cause of slowness
似乎您的应用程序需要更多时间来响应 apache ProxyTimeout ProxyTimeout尝试在您的 vhost/httpd 配置中增加 proxytimeout 并重试 根本原因是您的应用程序运行缓慢。你需要找到缓慢的根本原因
回答by SomeDoubts
The settings for the packet data transfer needs to be increased which is now low and the ab tool is not able to serve any data after the completion of the mentioned packets. You can change the configuration as below and then can enjoy running ab tool for your applications. On Ubuntu Server you can find them in /etc/sysctl.conf
需要增加数据包数据传输的设置,该设置现在很低,并且在上述数据包完成后,ab 工具无法提供任何数据。您可以更改如下配置,然后就可以为您的应用程序运行 ab 工具了。在 Ubuntu Server 上,您可以在 /etc/sysctl.conf 中找到它们
net.ipv4.netfilter.ip_conntrack_max = 32768
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_orphan_retries = 1
net.ipv4.tcp_fin_timeout = 25
net.ipv4.tcp_max_orphans = 8192
net.ipv4.ip_local_port_range = 32768 61000
回答by reachtoNS
Try adding following apache parameters inside the virtual host section
which should be in httpd.conf
file or any other place per your server configuration
尝试添加以下 apache 参数,the virtual host section
其中应该在httpd.conf
文件中或根据您的服务器配置的任何其他位置
Timeout 2400 ProxyTimeout 2400 ProxyBadHeader Ignore
Timeout 2400 ProxyTimeout 2400 ProxyBadHeader Ignore
This resolved problem in my case. I am using Apache 2.4 and tomcat ajp/http configurations.
这解决了我的问题。我正在使用 Apache 2.4 和 tomcat ajp/http 配置。