Forum OpenACS Q&A: 503 service unavailable... apache as reverse proxy

Sorry bother about non-OpenACS topic but i would really appreciate some help this community could offer.

Recently people at my work placed Apache2.2.3 with mod_proxy to redirect internet requests to our major OpenACS/dotLRN installation.

It often happens that the connection to the backend server (aolserver4r10) fails:

[error] (110)Connection timed out: proxy: HTTP: attempt to connect to xxx.xxx.xxx.xxx:xxx (host.example.com) failed

When this happens the apache worker is disabled for a while

[error] ap_proxy_connect_backend disabling worker for (myserver.example.com)

Usually the worker keeps disabled for 1 min. During that time I see the following apache error log:

[error] proxy: HTTP: disabled connection for (myserver.example.com)

The Clients receive a 503 Service Unavailable error, but when going directly to the backend server (not passing the reverse proxy) there is nothing wrong.

Does anybody have some advice how we could solve this apache behavior (unfortunately they do not want try alternatives to apache like pound or nginx)?

I read about some apache directives regarding mod_proxy (http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass) and others issues like apache MPM mode and MaxClients parameter. Is this the right direction?

Thanks.

First, you should post the proxy section of the Apache configuration file here in this thread, so that we can see what the config is.

Second, I would check /etc/hosts to be sure that the hostname you are trying to reach is always known to the OS. If there is a temporary error in DNS then the proxy machine will not be able to reach the server.

That is, if the AOLserver is running on example.myserver.com with an IP of 192.168.1.1 , then add to /etc/hosts this line:

192.168.1.1 example.myserver.com

Third I would check the aolserver log to see if there is an error message there, that corresponds to the time of the apache log entry.

You may need to set certain options, like changing whether HTTP 1.0 or 1.1 headers are sent, check the KeepAlive setting, whether HTTP pipelining is enabled, etc. on the Apache proxy module. But the above is what I would examine first.