Php – Varnish 503 error after exactly 60 seconds… how to change this timeout value

apache-2.2drupalPHPtimeoutvarnish

I'm running Varnish over Apache on a Drupal site. I have a PHP script that executes on a certain path of my site, and takes a really long time… like 60 – 120 seconds. When trying to access that page, Varnish always gives me 503 guru meditation timeout after exactly 60 seconds.

I have tried setting Varnish connect_timeout to a really high value… I have tried setting all of the timeouts in Apache's php.ini to really high values… but no luck: Varnish just keeps giving me the 503 error after exactly 60 seconds.

So here's my question: where is this 60 second timeout value coming from? I'm pulling my hair out here…

(FYI: if I take Varnish out of the picture, Apache serves the page as expected after 60 – 120 seconds, which makes me think the timeout must be somewhere on the Varnish side…).

Best Answer

I've encounter 503 errors the time that my server is not much of load. I tried to avoid that problem by increasing the timeout in vcl conf

first_byte_timeout = 300s; (by default this is set to 60s) <- probably this one can answer your question (or not) :)

Kindly check this out

http://vincentfretin.ecreall.com/articles/varnish-guru-meditation-on-timeout

hope this one helps