Welcome! Log In Create A New Profile

Advanced

Re: nginx post response doesn't get cached

Maxim Dounin
January 08, 2013 02:32PM
Hello!

On Tue, Jan 08, 2013 at 06:57:08AM -0500, nurettin wrote:

> Here's the related configuration:
>
> proxy_cache_path /var/www/cache levels=1:2 keys_zone=kendi-cache:1000m
> max_size=10000m;
> proxy_cache_key "$request_uri|$request_body";
>
>
> When I send small requests, nginx works great.
> When I send a large post request (long uri) I get these logs:
>
> I have debug on error.log, here's the output:
>
> 2013/01/08 13:50:25 [error] 32765#0: *1 cache key too large, increase
> upstream buffer size 4096, client:...
> 2013/01/08 13:51:01 [warn] 32765#0: *1 an upstream response is buffered to a
> temporary file /var/www/cache/tmp/0000000001 while reading upstream,
> client:...
> 2013/01/08 13:51:20 [notice] 300#0: http file cache: /var/www/cache 0.000M,
> bsize: 4096
> 2013/01/08 13:51:20 [notice] 32764#0: signal 17 (SIGCHLD) received
> 2013/01/08 13:51:20 [notice] 32764#0: cache loader process 300 exited with
> code 0
> 2013/01/08 13:51:20 [notice] 32764#0: signal 29 (SIGIO) received
>
> I'm not sure what to do here.

Ah, ok, the error message logged suggests that you need to
increase upstream buffer - it's used to store cache header and
it's too small to hold your cache key with request body included.

The "increase upstream buffer size" wording is indeed not very
helpful, it was made more specific in nginx 1.1.0+. In case of
proxy, you have to increase proxy_buffer_size, see
http://nginx.org/r/proxy_buffer_size.

--
Maxim Dounin
http://nginx.com/support.html

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

nginx post response doesn't get cached

nurettin December 29, 2012 12:46PM

Re: nginx post response doesn't get cached

Maxim Dounin January 03, 2013 10:48PM

Re: nginx post response doesn't get cached

nurettin January 04, 2013 01:53AM

Re: nginx post response doesn't get cached

Maxim Dounin January 04, 2013 07:34AM

Re: nginx post response doesn't get cached

nurettin January 08, 2013 06:57AM

Re: nginx post response doesn't get cached

Maxim Dounin January 08, 2013 02:32PM

Re: nginx post response doesn't get cached

nurettin January 12, 2013 02:33AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready