Tomcat stops responding to Apache

后端 未结 4 1397
别那么骄傲
别那么骄傲 2020-12-31 09:04

I\'m trying to resolve an issue about connecting Apache and Tomcat with mod_proxy_ajp. In my case, the Tomcat stops to response the Apache, and the apache log prints logs er

4条回答
  •  情书的邮戳
    2020-12-31 09:29

    I am using tomcat 8 with apache 2.2 and Centos, found the issue saying:

    [error] ajp_read_header: ajp_ilink_receive failed
    [error] (70007)The timeout specified has expired: proxy: read response failed
    

    The solution I applied and it worked perfect:

    1. Configure Apache 'MaxClients' to be equal to the Tomcat AJP 'maxConnections' configuration.
    2. Configure Tomcat AJP 'keepAliveTimeout' to close connections after a period of inactivity.
    

    Here is an example from tomcat server.xml:

    
    

    vote for answer if you liked this solution. cheers

提交回复
热议问题