我間歇性地收到以下錯誤我的服務器上:Apache的代理錯誤
**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/
我看了很多帖子表明在連接超時設置Apache中的tomcat和環境設置。我已在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來重寫網址。不知道這是否對錯誤有影響?
編輯> 我的服務器在正常時間在150MB的可用內存上運行,並且可以降低很低,但不會出現上述錯誤的確切時間。這會導致這樣的錯誤嗎?
我會很感激任何想法的人。
謝謝。
首先,設置Apache的日誌級別進行調試,並嘗試捕獲有關該問題的更多信息。其次,你可能真的有內存相關的問題。使用[VisualVM](http://java.net/projects/visualvm)查看您的GC循環需要多長時間。 – erloewe 2011-02-07 18:08:46