Skip to content
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

varnish (edge) http_resp_hdr_len does not match pantheon's setting. #109

Closed
apotek opened this issue Mar 15, 2022 · 3 comments
Closed

varnish (edge) http_resp_hdr_len does not match pantheon's setting. #109

apotek opened this issue Mar 15, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@apotek
Copy link
Contributor

apotek commented Mar 15, 2022

What is the problem?

Pantheon's setting for http_resp_hdr_len on the edge server (varnish) is 25k.
The default varnish setting is 8k. The lando pantheon recipe does not match since it uses the default.

How does it manifest?

If you are doing drupal development and setting cache keys and cache tags, you will likely have the http.response.debug_cacheability_headers setting set to true. These diagnostic http headers are enormous, swelling the response header size far past what a default edge server is going to accept, leading to a Page Unavailable response (from varnish) even though the appserver and nginx are returning the page.

image

Is there a workaround?

Yes, since the edge image is using gotpl to configure varnish during build, we can set an environment variable at build time to make sure varnish gets built with a different setting than default.

The workaround is putting this in .lando.local.yml:

  edge:
    overrides:
      environment:
        VARNISHD_PARAM_HTTP_RESP_HDR_LEN: 25k

and then destroying and rebuilding.

What is the real solution?

Since the goal of this recipe is to match (as far as possible) a pantheon environment, we shouldn't have to use a workaround or override in lando configs, but instead the edge container should be built with an http_resp_hdr_len that matches pantheon's by default.

To do so requires defining our desired value for the build to ensure the value is written into the varnish startup parameters. I will put up a PR to adjust the http_resp_hdr_len varnish config value to 25k instead of the default 8k.

@apotek
Copy link
Contributor Author

apotek commented Mar 15, 2022

PR is up and local testing shows it works.

apotek added a commit to apotek/pantheon that referenced this issue Mar 15, 2022
apotek added a commit to apotek/pantheon that referenced this issue Mar 15, 2022
reynoldsalec added a commit to apotek/pantheon that referenced this issue Mar 22, 2022
reynoldsalec added a commit that referenced this issue Mar 23, 2022
* #109 Make edge match pantheon varnish http response header max length

* #109 localize env var VARNISHD_PARAM_HTTP_RESP_HDR_LEN to just the edge service

* #109 add test for d7

* #109: Attempt to fix varnish test by using std out.

* #109: Try adding in cd to the test-able directory.

Co-authored-by: apotek <279278+apotek@users.noreply.github.com>
@apotek
Copy link
Contributor Author

apotek commented Mar 31, 2022

@reynoldsalec Should I close this issue since you merged in our work? Or does this stay open until it is in the latest release?

@labboy0276
Copy link
Contributor

This will be included in the 0.5.8 release of this plugin. We will include it in the 3.6.3 release of Lando.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants