Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running a localhost CouchDB instance using CouchDBX on my Mac, proxied behind Apache 2 using the ProxyPass directive:

<VirtualHost *:80>
    ServerName playlick # points to localhost in /etc/hosts
    DocumentRoot "/Users/james/Sites/playlick"
    ProxyPass /data http://localhost:5984
    ProxyPassReverse /data http://localhost:5984

If I try to hit my Couch instance at http://playlick/data while it's not running I get a 503 Service Temporarily Unavailable error, as would be expected.

I then start up the Couch server and hit the same URL, but I still get the error until I restart the Apache proxy.

If on the other hand, I start up the Couch instance before hitting that URL, everything works fine without having to touch Apache.

So it seems as though the 503 error is cached until the Apache process is restarted. How do I stop this from happening?

OR, if that's not possible, how do I force Apache to restart when I start up the Couch instance in the CouchDBX GUI app?

share|improve this question
How in the world did you ever get /data to work properly. I try and always get "File does not exist: [DocumentRoot]/_all_dbs, referer: localhost/data/_utils/index.html";. It looks like there are problems in the jquery.couch.js because they refer to "/_all_dbs" and removing the "/" does make the above error appear as relative to _utils but is this really a bug or is there something else i have to configure? – nicerobot Sep 17 '09 at 7:10
up vote 15 down vote accepted

I believe what you need to be looking at is the retry option that you can pass with the ProxyPass directive.

retry default: 60 seconds

Connection pool worker retry timeout in seconds. If the connection pool worker to the backend server is in the error state, Apache will not forward any requests to that server until the timeout expires. This enables to shut down the backend server for maintenance, and bring it back online later. A value of 0 means always retry workers in an error state with no timeout.

share|improve this answer
Perfect. This did it: ProxyPass /data localhost:5984 retry=0 – James Wheare Aug 26 '09 at 1:02
Also fixed the same issue for node.js apache passthrough. – Will Shaver Jun 20 '12 at 20:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.