Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am fairly good in server configurations but now I am trying to resolve the following error in Apache:

[Mon Apr 08 11:02:36 2013] [error] (104)Connection reset by peer: ajp_ilink_receive() can't receive header
[Mon Apr 08 11:02:36 2013] [error] ajp_read_header: ajp_ilink_receive failed
[Mon Apr 08 11:02:36 2013] [error] (120006)APR does not understand this error code: proxy: read response failed from 127.0.0.1:8009 (localhost)

Apache "httpd.conf":

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>

<IfModule worker.c>
StartServers         4
MaxClients         800
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     50
MaxRequestsPerChild 1000
</IfModule>

proxy_ajp.conf:

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
ProxyPass / ajp://localhost:8009/ retry=1

Tomcat6 server.xml:

<Connector port="8080"
           maxHttpHeaderSize="8192"
           maxThreads="150"
           minSpareThreads="25"
           maxSpareThreads="75"
           enableLookups="false"
           redirectPort="8443"
           acceptCount="100"
           connectionTimeout="20000"
           disableUploadTimeout="true"
           compression="on"
           compressionMinSize="2048"
           noCompressionUserAgents="gozilla, traviata"
           compressableMimeType="text/html,text/xml,text/plain,application/json" />
<Connector port="8009"
           enableLookups="false"
           redirectPort="8443"
           protocol="AJP/1.3"
           backlog="200"
           maxThreads="400" />

I am still not able to find why I am getting the above apache error except that Apache is not able to communicate with Tomcat. But I am not able to reproduce this constantly (occurring randomly in weeks interval).

Are there any rules between the attributes in Apache and Tomcat? For example, I changed "StartServers" of "worker.c" from 2 to 4. But I am not sure if this is causing the problem.

Your help is very much appreciated.

share|improve this question
    
Can you also post the mod_proxy_ajp-relevant portions of your httpd.conf –  mahnsc Apr 13 '13 at 11:44
    
I have updated my post with Proxy-ajp details. No other configurations are there in httpd.conf related to Proxy –  Slowcoder Apr 15 '13 at 19:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.