Varnish Error 503 Service Unavailable

Miles miles at jamkit.com
Tue Nov 18 19:42:11 CET 2008



Brano wrote:
> Brano [B], on Tuesday, November 11, 2008 at 14:42 (+0700) typed:
> 
> B> recently we installed Varnish on our server. Everything works fine,
> B> but on download we get this error:
> B> http://www.opensubtitles.org/en/download/file/1951965961
> 
> it works now. I did not change nothing in varnish, I changed PHP code.
> 
> This was original code:
> if(isset($_SERVER["HTTP_USER_AGENT"]) and strpos($_SERVER["HTTP_USER_AGENT"], 'MSIE')) {
>    ini_set('zlib.output_compression', 'Off');
> }
> 
> I replaced it with:
> ini_set('zlib.output_compression', 'Off');
> 
> Now it works OK. Just to let you know, I am not sure, if it is bug,
> or...
> 
> VCL: http://www.pastebin.sk/en/9031/
> 

Do you also set vary headers?  If not, this might be a cause of the 
problem - varnish could be serving up compressed content to clients that 
are not expecting it.  You need to vary on "accept-encoding" in order to 
get varnish to store both representations, and be able to serve up the 
right one.

Miles







More information about the varnish-misc mailing list