在我们的环境中,我们在错误日志中一致地获取这些条目。
[Sun Dec 22 20:29:43 2013] [error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header
[Sun Dec 22 20:29:43 2013] [error] ajp_read_header: ajp_ilink_receive failed
[Sun Dec 22 20:29:43 2013] [error] (70007)The timeout specified has expired: proxy: read response failed from (null) (xx.xx.xx.xx)
[Sun Dec 22 20:30:01 2013] [error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header
如果所有节点同时出现这些错误,站点将抛出 998 响应代码,直到重新启动,使这些错误消失。 Apache 正在与后端 jboss 服务器通信。
可能导致这些问题的原因是什么。根据我的观察,这可能是由于 Web 服务调用的延迟导致 AJP 连接终止。
如果我错了,请纠正我,以及如何永久解决此问题。
谢谢。
最佳答案
(迟到总比不到好)
我也有类似的问题;
[Mon Jan 20 13:39:57 2014] [error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header
[Mon Jan 20 13:43:26 2014] [error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header
这让我找到了这个:
When nodeTimeout is not defined the ProxyTimeout directive Proxy is used. If ProxyTimeout is not defined the server timeout (Timeout) is used (default 300 seconds). nodeTimeout, ProxyTimeout or Timeout is set at the socket level.
我既没有 nodeTimeout 也没有 ProxyTimeout,这给我们留下了 Timeout 变量(设置为 60 秒)。在大多数情况下,60 秒足以返回网页,但对该应用程序的调查显示,错误的 MySQL 查询运行时间超过 20 分钟(是的,几分钟!)。
您可以尝试增加超时时间,或者更有可能的是找出页面速度缓慢的原因。
关于apache - Apache 错误日志中的 Mod 集群代理超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20749501/