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
send Varnish BAN requests with smaller headers #2865
send Varnish BAN requests with smaller headers #2865
Conversation
Is there a limit on varnish? How did you come up with the value Nice improvement! |
FYI, there is a chunk made in FosHTTPCache https://github.com/FriendsOfSymfony/FOSHttpCache/blob/master/src/ProxyClient/Varnish.php#L84 and there is a method dedicated to calculate how much tags fits in the http header : https://github.com/FriendsOfSymfony/FOSHttpCache/blob/master/src/ProxyClient/HttpProxyClient.php#L137 |
@soyuka it's a really conservative value, but default values in Varnish are not that big (you have by default http_req_hdr_len=8k and http_req_size=32k in Varnish, but even with http_req_size=64k & http_req_hdr_len=4096k I was still experiencing 400 Bad Request issues). |
@bastnic thanks for the tips, this looks great! I'll check if I can improve this PR using the same kind of computation |
👍 on my side! Copying (and crediting) the method from FOSHttpCache looks like a good idea. Could you also fix the PHPStan issue please? |
cc22c6c
to
4d0e185
Compare
…erver to avoid overflow during BAN command
4909805
to
6558e19
Compare
@dunglas changes done, adding a yaml config variable to set the max_header_length supported by the server + tests |
Hi @dunglas , any plan to merge this one ? :) |
Hello there! Should we have a release date for this feature? It's something we're waiting with excitement :) |
Hi there! Any update on this one? |
Co-Authored-By: Teoh Han Hui <teohhanhui@gmail.com>
phpstan failure not related. |
Thanks @jocel1! 🎉 🚀 |
The idea of this PR is to split the iris in several smaller chunks to avoid the "400 Request Header Or Cookie Too Large" on Varnish when the iris contains a large amount of elements.
CHUNK_SIZE is currently hardcoded, but if this could be controlled as a YAML config parameter, it would be even better.