Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
How to deal with Proxy Error's
4 Posts
How to deal with Proxy Error's

At times I have been getting server proxy error in my site

Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /home/Soegeresultat.

Reason: Error reading from remote server


Apache/2.0.59 (Win32) mod_ssl/2.0.59 OpenSSL/0.9.7j Server at www.XXXXXXXX.com Port 80

I am using Mongrel with Apache on Windows 2003 server, running 20 mongrel clusters .

I am not able to figure out where the issue is, is it with number of mongrel clusters? or anything in Apache configuration?

Person
Forum Rating: 100
Sign In To Rate Post

Hi Bala,

If you are running mongrel_cluster in background with apache+mod_proxy to serve rails requests then this might help you.

mod_proxy sometimes reject requests to Mongrel. This comes from two known Apache bugs "#39499":http://issues.apache.org/bugzilla/show_bug.cgi?id=39499 and "#37770":http://issues.apache.org/bugzilla/show_bug.cgi?id=37770

To resolve the problem and as workaround for it add the lines below to your Apache VirtualHost section.

Fix for Apache bug 39499



   SetEnv force-proxy-request-1.0 1
   SetEnv proxy-nokeepalive 1

Can i set email notification in Apache config. to trigger mail whenever the server encounters a proxy error?

Person
Forum Rating: 100
Sign In To Rate Post

Balaji,

No, I don't believe you can set Apache to notify you when this Proxy error occurs, because this is a passive proxy error, meaning that it does this only when requests come in. It does not do any kind of active monitoring of the mongrel_cluster behind it. That is, unless there is something that I'm not familiar with.

Your best bet is to setup some kind of remote monitoring, that checks for the HTTP status code, or even content at regular intervals. A lot of remote monitoring services exist, and I'm certain some of them are capable of monitoring based on content or response code.

Kevin Elliott "WeLikeFood Beta":http://www.welikefood.com

4 Posts
Login to add your message