From 336f3cb108a32ffc3a69b45137b08ec5982c89c0 Mon Sep 17 00:00:00 2001 From: Aaron Roydhouse Date: Thu, 2 Mar 2017 16:11:27 -0500 Subject: [PATCH] Fix error caused by increasing proxy_buffer_size (#363) This fixes the bug raised in #363, by increasing the size of the proxy_buffers (memory allocation) to match the size of the proxy buffer. This leaves the default values (with no ingress setting) unchanged: ``` proxy_buffer_size 4k proxy_buffers 4 4k ``` If 'proxy-buffer-size' is set, then now both the buffer size and the memory allocation size is increased: ``` proxy_buffer_size "{{ $location.Proxy.BufferSize }}"; proxy_buffers 4 "{{ $location.Proxy.BufferSize }}"; ``` I have been using this patch with 0.8.3 and 0.9.0-beta.2. --- controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl b/controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl index ae06cd235..9d29e9a5d 100644 --- a/controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl +++ b/controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl @@ -331,6 +331,7 @@ http { proxy_redirect off; proxy_buffering off; proxy_buffer_size "{{ $location.Proxy.BufferSize }}"; + proxy_buffers 4 "{{ $location.Proxy.BufferSize }}"; proxy_http_version 1.1;