Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have set up my web server with Passenger serving a Rails app via Nginx. I would like to put Varnish in front of Nginx to cache the web pages, since Passenger is taking its sweet time about creating pages.
I compiled Varnish, and ran it with the command

varnishd -a [external IP removed]:80 -b -F

However, when visiting the external IP, I was greeted with a 503 page and a "guru meditation" code (XID: 741199024).
No idea what this means, but I think I may have configured this wrongly.
Does anybody have any idea where I went wrong?

Thank you ever so much for your time, it is greatly appreciated!
Luke Carpenter

share|improve this question
Problem solved. The problem was, since I can only use 2 ports per IP address, Varnish was attempting to connect to the SSH server, running on 443 on another IP. Simply setting it to listen to the IP NGINX is binded on removed the error. – lcarpenter Oct 13 '10 at 16:48

Are you aware Varnish does NOT deal with HTTPS ? I'm not sure what you're trying to do, but your backend listen on 443 which is a bit weird.

If your traffic is SSL, you probably need something like nginx(ssl)-varnish(nossl)-nginx(nossl)-passenger. This setup is not that uncommon, and you can use the same nginx.

share|improve this answer
I have to use 443, since there are only two ports available for me to access due to the firewalling system at college, where the site is going to get used the most. There is no SSL involved. – lcarpenter Oct 13 '10 at 16:45

503 usually means that the backend didn't respond quickly enough or the connection closed right when it tried to do the request. You can alter the grace timer (if the backend was down/refused connection), alter the wait for the backend to get a response or modify a few other settings depending on why you got the 503.

running varnishlog (piping it/typescript) and watching those requests can tell you why something happened. You can specify the IP address to watch, so, you don't need to see all of the traffic coming across, just the traffic from your IP.

share|improve this answer

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.