-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
varnishreload
fails for non-trivial (large) VCLs
#168
Comments
Thank you for the detailed report. The Probes have a default initial value of the threshold minus one, which means that a backend is considered healthy until at least its first probe request succeeds. When I don't know why using the So what we probably should do is document the purpose of It's also probably long overdue to move this script to the new |
I won't pretend to understand any of that, but certainly tests sound like a good idea. It occurred to me this script is designed to suit a lot more use-cases than just my own, though I have no idea what those are. |
The script could move there: https://github.com/varnishcache/varnish-cache/tree/master/contrib For the I think I understand now after reading the description again that If we were to fix varnishcache/varnish-cache#4012 as you suggested, that would break your batch approach anyway. In particular, So really, the solution for you would be pass |
I'm afraid I still don't think you understand. The issue, according to my limited understanding, is that However, if you use multiple |
I'm afraid my patience is running thin, so my efforts at trying to engage just varnished. |
Since Varnish 6.6/Jammy (official .deb) (for some reason, it did not occur on 6.5/Bionic (Packagecloud)), recompiling my VCL takes a non-trivial amount of time (about 10 seconds). This may be because I have a large ACL weighing in at 165 KB. This causes
varnishreload
to fail because it uses two discrete invocations ofvarnishadm
to both compile (vcl.load
) and activate (vcl.use
) the VCL. Although it is possible to work around this issue by specifying an arbitrary wait (-w 10
), it should be considered a poor solution for two reasons:varnishreload
will reload their configuration (without the need to know of or the use of any command options).I would like to propose a better solution: send all commands to
varnishadm
together. This works because the invocation ofvcl.load
is inherently blocking, which means queuing up thevcl.use
after it will only wait the exact amount of time required before the next invocation ofvcl.use
is safe to follow, which seems to me to be a much more elegant solution. The reason the current script fails is because discrete invocations ofvarnishadm
are independent and do not know of or care about any pending commands in other processes.The following proof of concept is all that is required to reload my configuration successfully, demonstrating the point.
Might I suggest integrating this approach, and at the same time, dropping the unnecessary
-w
option?The text was updated successfully, but these errors were encountered: