Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a set of scripts on the /admin path that can take a while to execute, and cause Varnish to hit the timeout limit. Is there a way to increase the timeouts for a particular path rather than for an entire backend?

share|improve this question

2 Answers 2

You may try to add one more backend with same host, but different timeouts

And use it for your urls with req.backend

backend default {
.host = "127.0.0.1";
.port = "81";
}

backend admin {
.host = "127.0.0.1";
.port = "81";
.connect_timeout = 600s;
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
}

sub vcl_recv {
...
if (req.url ~ "^/admin")
{
set req.backend = admin;
}
..
}
share|improve this answer

Just recently ran into something like this ..

We added the following in the backends (make sure NOT TO PUT it in the .probe { } sub-declaration [just a small error that caused a hint of confusion for us for a short time ;]):

.connect_timeout = 60s;
.first_byte_timeout = 120s;
.between_bytes_timeout = 60s;

You can read more about them with 'man vcl'.

Hope this helps!

share|improve this answer

Your Answer

 
discard

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.