Re: "upstream sent too big header while reading response header from upstream"?

2016-02-03 Thread Rafał Radecki
;> I am currently trying to find the source of "upstream sent too big header >> while reading response header from upstream" in my logfiles because nginx >> as a consequence returns "502 Bad Gateway". >> >> Basically I used tcpdump to get the tr

Re: "upstream sent too big header while reading response header from upstream"?

2016-02-03 Thread Richard Stanway
You want proxy_buffer_size. http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size On Wed, Feb 3, 2016 at 2:24 PM, Rafał Radecki wrote: > Hi All. > > I am currently trying to find the source of "upstream sent too big header > while reading response header

"upstream sent too big header while reading response header from upstream"?

2016-02-03 Thread Rafał Radecki
Hi All. I am currently trying to find the source of "upstream sent too big header while reading response header from upstream" in my logfiles because nginx as a consequence returns "502 Bad Gateway". Basically I used tcpdump to get the traffic and I compared two cases: 1)

Re: upstream sent too big header while reading response header from upstream

2014-02-11 Thread Maxim Dounin
Hello! On Mon, Feb 10, 2014 at 09:45:50AM -0800, Jeroen Ooms wrote: > On Mon, Feb 10, 2014 at 5:15 AM, Maxim Dounin wrote: > > it is likely the cause, as the config includes the following lines: > > > > proxy_cache_methods POST; > > proxy_cache_key "$request_method$request_uri$request_bo

Re: upstream sent too big header while reading response header from upstream

2014-02-10 Thread Jeroen Ooms
On Mon, Feb 10, 2014 at 5:15 AM, Maxim Dounin wrote: > it is likely the cause, as the config includes the following lines: > > proxy_cache_methods POST; > proxy_cache_key "$request_method$request_uri$request_body"; > Yikes I was not aware that the cache key gets stored into the buffers as

Re: upstream sent too big header while reading response header from upstream

2014-02-10 Thread rubenarslan
Yes, that's quite probably it! Then I guess it's on Jerome to weigh in, I don't know the exact reasoning for doing so, I would have thought it would be more appropriate to hash the request body in the cache key, but maybe that's not possibly using nginx? OpenCPU allows for request bodies up to 500

Re: upstream sent too big header while reading response header from upstream

2014-02-10 Thread Maxim Dounin
Hello! On Mon, Feb 10, 2014 at 07:56:22AM -0500, rubenarslan wrote: > Hi Basti, > > thanks, I found the SO post myself. I had not set up the directives > properly, so thought the fix didn't work. It does now. I also think they > described a different problem, as in my case no cookies were sent,

Re: upstream sent too big header while reading response header from upstream

2014-02-10 Thread rubenarslan
Hi Basti, thanks, I found the SO post myself. I had not set up the directives properly, so thought the fix didn't work. It does now. I also think they described a different problem, as in my case no cookies were sent, headers were fairly small and two requests with pretty much identical headers se

Re: upstream sent too big header while reading response header from upstream

2014-02-10 Thread rubenarslan
Hi, after some further testing I discovered that I had the order in which various nginx config files are called wrong. Because location {} isn't merged, but overridden, my directives never 'took'. Setting proxy_buffer_size 8k; kept the errors from occurring. As I wrote on Github https://github.

Re: upstream sent too big header while reading response header from upstream

2014-02-10 Thread basti
t no increase of proxy buffer > settings solves the problem at all (or shifts the treshold at which the > error messages occur). So I think it's safe to say the error message > upstream sent too big header while reading response header from upstream > is misleading (unless the CO

Re: upstream sent too big header while reading response header from upstream

2014-02-10 Thread rubenarslan
course, the ridiculously large proxy settings were only chosen in desperation, but I can now report that no increase of proxy buffer settings solves the problem at all (or shifts the treshold at which the error messages occur). So I think it's safe to say the error message upstream sent too big

Re: upstream sent too big header while reading response header from upstream

2014-02-06 Thread Maxim Dounin
Hello! On Thu, Feb 06, 2014 at 09:11:31AM -0800, Jeroen Ooms wrote: > On Thu, Feb 6, 2014 at 4:18 AM, Maxim Dounin wrote > > > > Response headers should fit into proxy_buffer_size, see > > http://nginx.org/r/proxy_buffer_size. If they don't, the error > > is reported. > > > In which the "size

Re: upstream sent too big header while reading response header from upstream

2014-02-06 Thread Jeroen Ooms
On Thu, Feb 6, 2014 at 4:18 AM, Maxim Dounin wrote > > Response headers should fit into proxy_buffer_size, see > http://nginx.org/r/proxy_buffer_size. If they don't, the error > is reported. In which the "size" refers to the number of characters that appear up till the blank line that separates

Re: upstream sent too big header while reading response header from upstream

2014-02-06 Thread Maxim Dounin
Hello! On Wed, Feb 05, 2014 at 03:48:50PM -0800, Jeroen Ooms wrote: > After I added some CORS headers to my API, one of the users of my > nginx-based system complained about occasional errors with: > > upstream sent too big header while reading response header from upstream

upstream sent too big header while reading response header from upstream

2014-02-05 Thread Jeroen Ooms
After I added some CORS headers to my API, one of the users of my nginx-based system complained about occasional errors with: upstream sent too big header while reading response header from upstream He also reported to have worked around the issue using: proxy_buffers 8 512k; proxy_buffer_size