我的服务器偶尔会出现以下错误:
**Proxy Error**
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Reason: Error reading from remote server
错误日志显示如下内容:
[Sun Feb 06 03:06:00 2011] [error] [client 82.43.154.57] proxy: Error reading from remote server returned by /login, referer: https://demo.XXXXX.us/
[Sun Feb 06 03:06:30 2011] [error] [client 82.43.154.57] (70007)The timeout specified has expired: proxy: error reading status line from remote server XXXXX.us
[Sun Feb 06 03:06:30 2011] [error] [client 82.43.154.57] proxy: Error reading from remote server returned by /
[Sun Feb 06 03:13:31 2011] [error] [client 82.43.154.57] (70007)The timeout specified has expired: proxy: error reading status line from remote server XXXXX.us
[Sun Feb 06 03:13:31 2011] [error] [client 82.43.154.57] proxy: Error reading from remote server returned by /
我读了很多有关Tomcat连接超时设置和Apache环境设置的帖子。我已在httpd.conf中进行了以下设置:
<VirtualHost *>
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</VirtualHost>
我也在tomcat server.xml中设置了以下内容:
<Connector port="9080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="9443" acceptCount="100"
connectionTimeout="60000" disableUploadTimeout="true" />
另外,一旦出现错误,我必须启动一个新的浏览器才能使错误消失,因为即使刷新后仍然会显示。其次,我正在使用htaccess重写url。不知道这是否对错误产生影响?
编辑>我的服务器在正常情况下运行150mb的空闲内存,并且可能会降低,但不是在上述错误发生的确切时间。这会导致这样的错误吗?
我将非常感谢任何人提供的想法。
谢谢。