访问apache出现500的错误分析
服务器环境为apache+tomcat,通过ajp进行连接,超时时间设置为60s。当发出一个请求的时候,经过很长时间返回500 internal server error错误。首先需要定位请求失败的原因,到底是apache的问题还是tomcat的问题。首先观察apache的error_log,可以看到如下的信息:
ajp_read_header: ajp_ilink_receive failed
(120006)APR does not understand this error code: proxy: read response failed from (null) (xx.xx.xx.xx)
这说明是apache到tomcat的请求发生了超时,所以apache返回500错误。问题在tomcat一端。
对于tomcat问题的定位,确实不太容易~~ 可能是数据库请求过长,也可能是网络连接proxy中断。想到的一个方法是通过Linux命令kill -quit <thread-num> 把线程池打印出来分析。
页:
[1]