Apache与Tomcat配置

时间:2013-04-09 19:15:33

标签: apache tomcat6

我在服务器配置方面很强大,但我试图在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>

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" />

我仍然无法找到为什么我得到上述apache错误,除了Apache无法与Tomcat通信。但我无法不断重现这一点(在几周内随机发生)。

Apache和Tomcat中的属性之间是否有任何规则?例如,我将“worker.c”的“StartServers”从2更改为4.但我不确定这是否导致问题。

非常感谢您的帮助。

0 个答案:

没有答案