Apache proxy error

I periodically get the following error on my server:

**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 

Error logs show the following:

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

I read a lot of posts suggesting connection timeout settings in tomcat and environment settings in Apache. I installed the following in httpd.conf:

 <VirtualHost *> SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 </VirtualHost> 

I also installed the following in tomcat server.xml:

 <Connector port="9080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="9443" acceptCount="100" connectionTimeout="60000" disableUploadTimeout="true" /> 

In addition, as soon as an error occurs, I have to start a new browser so that the error disappears, since it continues to be displayed even when updating. Secondly, I use htaccess to rewrite the url. Not sure if this affects the error?

EDIT> My server runs on 150 MB of free memory at normal times and can drop quite low, but not at the exact times of the above error. Will this lead to such an error?

I would be grateful for any ideas that people have.

Thanks.

+7
source share
2 answers

This was a problem with Pear Mailer.

We used Pear Mailer, which uses a queue to store emails ready to be sent with a cron job. An error occurred in the Pear script that was called up with every action on our site (creating messages, sending messages, etc.). The pear collapsed, which in turn crashed the browser, as a result of which mistakes were made.

Disabling Pear resolved the issue, and setting up the code made it work again.

It took so long to find the problem, since we never thought that Pear Mailer could trigger such an answer.

0
source

we had a similar problem on our server after mysql crashed and the only solution was to restart the server.

0
source

All Articles