Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
February 11, 2014 05:56AM
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 <mdounin@mdounin.ru> 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 well. Is this mentioned in the manual anywhere?

Likely no. It's mostly proxy cache implementation detail - it needs a
way to write a cache header (which includes key) to a cache file,
and places it to the buffer just before response headers from
an upstream.

> So we need to set proxy_buffer_size to a value greater than the sum of
> client_body_buffer_size + header size?

If you use $request_body in the cache key - yes. And don't forget
to add other variables in proxy_cache_key.

> Or alternatively, is there a
> way that to use a fixed length hash of the request body in the
> proxy_cache_key?

As of now hashes may be calculated using, e.g., the embedded perl
or 3rd party modules.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

upstream sent too big header while reading response header from upstream

Jeroen Ooms February 05, 2014 06:50PM

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

Maxim Dounin February 06, 2014 07:20AM

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

Jeroen Ooms February 06, 2014 12:14PM

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

Maxim Dounin February 06, 2014 12:20PM

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

rubenarslan February 10, 2014 05:55AM

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

rubenarslan February 10, 2014 07:50AM

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

basti February 10, 2014 06:14AM

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

rubenarslan February 10, 2014 07:56AM

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

Maxim Dounin February 10, 2014 08:16AM

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

rubenarslan February 10, 2014 08:59AM

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

Jeroen Ooms February 10, 2014 12:48PM

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

Maxim Dounin February 11, 2014 05:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 276
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready