Varnish 503 error after exactly 60 seconds... how to change this timeout value?

15,001

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

Share:
15,001

Related videos on Youtube

Jordan Magnuson
Author by

Jordan Magnuson

Updated on September 18, 2022

Comments

  • Jordan Magnuson
    Jordan Magnuson over 1 year

    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...).

  • Jordan Magnuson
    Jordan Magnuson about 10 years
    Thank you luilav! first_byte_timeout was indeed the problem. I suppose it is not possible to set this value higher only for a particular path?
  • NITEMAN
    NITEMAN about 10 years
    You can define another backend with a higher timeout and switch the backend for a particular path.