Skip to content

Apply proxy_custom_buffer_size option to API location as well

Manuel Grabowski requested to merge mg-applycustomproxybuffersize-20221027 into master

What does this MR do?

This intends to make sure that customers setting nginx['proxy_custom_buffer_size'] in their gitlab.rb will have this setting applied to the ^/api/v\d location as well. In 🎫 #336483 (internal), a customer had issues with upstream sent too big header while reading response header from upstream errors despite already having increased the proxy_custom_buffer_size value multiple times. Upon closer inspection it turned out that these errors were happening specifically for requests to the API, and that the corresponding location block in the generated nginx configuration does not get these settings applied.

We first verified that applying the settings at the API location block level did indeed resolve the issue. However, this manual change to the generated configuration would get overwritten on the next reconfigure, so as a permanent solution we had to resort to Inserting custom NGINX settings into the GitLab server block and set it at the server block level. This works fine, but it feels like a unnecessarily broad application of these settings.

Furthermore, I think it's a fair expectation that setting nginx['proxy_custom_buffer_size'] would apply to all requests to GitLab, instead of excluding the ones going to /api/v*.

Related issues

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for the GitLab Chart opened
Edited by Manuel Grabowski

Merge request reports