apache2.2+tomcat超时503

 

最近apache2.2+tomcat5.5.28(两个)的系统,客户反映说访问时报告了 503 错误,需要不断的刷新。

apache2.2使用的是mod_proxy_ajp与tomcat5连接。

 

 

apache错误日志:

 

[Fri Mar 23 15:36:57 2012] [error] proxy: dialog to **.***.*.**:8109 (**.***.*.**) failed
[Fri Mar 23 15:37:54 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:37:56 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:37:58 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:00 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:02 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:02 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:02 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:05 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:07 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:12 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:16 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:18 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:19 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:20 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:23 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:23 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:25 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:29 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:30 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:33 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:38:33 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:39:56 2012] [error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header
[Fri Mar 23 15:39:56 2012] [error] ajp_read_header: ajp_ilink_receive failed
[Fri Mar 23 15:39:56 2012] [error] (120006)APR does not understand this error code: proxy: read response failed from **.***.*.**:8209 (**.***.*.**)
[Fri Mar 23 15:40:15 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:16 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:16 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:16 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:16 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:37 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:37 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:43 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:50 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:51 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:52 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 15:40:53 2012] [error] proxy: BALANCER: (balancer://cluster). All workers are in error state for route (jvm82)
[Fri Mar 23 

 

 

然后,继续去查看tomcat的日志,发现后台在执行一个时间很长的处理(批量导入数据,处理时间超过5分钟)。

 

apache2.2的默认超时时间是300s(5分钟)。

参考:

 

Apache 2.2 中文版参考手册

 

 

 

ProxyTimeout 指令

说明 语法 默认值 作用域 状态 模块 兼容性
代理请求的网络超时
ProxyTimeout seconds
ProxyTimeout 300
server config, virtual host
扩展(E)
mod_proxy
仅在 Apache 2.0.31 及以后的版本中可用

 

 

-----------------------解决方案,待优化---------------------------------------

 

目前,推断的结果是apache的处理超时了,初步的解决方案是,将timeout设置的长一些。

 

 

 

 

 

 

 

你可能感兴趣的:(apache)