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

need annotation for nginx proxy_buffer_size #293

Closed
jshimko opened this issue Nov 29, 2016 · 5 comments
Closed

need annotation for nginx proxy_buffer_size #293

jshimko opened this issue Nov 29, 2016 · 5 comments
Assignees
Milestone

Comments

@jshimko
Copy link

jshimko commented Nov 29, 2016

If an upstream app has a header that's bigger than the default proxy buffer size, nginx returns a 502 and the client receives nothing.

Example logs...

2016/11/29 18:10:10 [error] 64#0: *59606 upstream sent too big header while reading response header from upstream, client: 100.96.2.1, server: ~^subdomain\.(?<domain>.+)$, request: "GET / HTTP/1.1", upstream: "http://101.69.46.220:80/", host: "subdomain.example.com"

[2016-11-29T18:10:10+00:00] - 100.96.2.1 - - - 502 - "GET / HTTP/1.1" - 732 - "-" - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2936.0 Safari/537.36" - "~^subdomain\x5C.(?<domain>.+)$" - 101.69.46.220:80 - subdomain.example.com - 0.005 - 0.005

The explanation/fix...
https://ma.ttias.be/nginx-proxy-upstream-sent-big-header-reading-response-header-upstream/

So, essentially just need to be able to add those proxy buffer lines to the config...

server {
  listen        80;
  server_name   host.tld;

  location / {
    proxy_pass       http://upstream;
    ...

    proxy_buffer_size          128k;
    proxy_buffers              4 256k;
    proxy_busy_buffers_size    256k;
  }
}

Reference:

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size

@bacongobbler
Copy link
Member

@jshimko we'd accept a PR if you're up for it.

warlokkz added a commit to warlokkz/router that referenced this issue Jan 27, 2017
… buffer size

adds proxy_buffers, proxy_buffer_size, proxy_busy_buffer_size lines and their relative $appConfig values in nginx config

addresses deis#293
@mboersma mboersma added this to the v2.12 milestone Feb 27, 2017
@gemoya
Copy link

gemoya commented Mar 2, 2017

Do you have a expected relase date with this changes??

@jshimko
Copy link
Author

jshimko commented Mar 7, 2017

Thanks again @krancour!

@krancour
Copy link
Contributor

krancour commented Mar 7, 2017

No problem, @jshimko.

@vdice
Copy link
Member

vdice commented Mar 7, 2017

@gemoya these changes are now included in the latest Router release, v2.11.0. Testing will commence shortly for the next Workflow release to include this version (Workflow v2.12) and we expect it will be available by tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants