Welcome! Log In Create A New Profile

Advanced

Re: Invalid parsed value for keys_zone. Is this a problem?

January 18, 2011 09:24AM
On Tue, Jan 18, 2011 at 08:35:10AM -0500, caruccio wrote:

> Hi,
>
> driven by a wrong undestand of proxy_cache's keys_zone parameter I have
> set it to a very high value:
>
> [code]
> proxy_cache_path /tmp/cache levels=2:2:2 keys_zone=cache:10000m
> max_size=50g inactive=5m;
> [/code]
>
> What happens is that 10G should be 10485760000, not 1895825408:
>
> [code]
> Breakpoint 3, ngx_http_file_cache_set_slot (cf=0xbfffef58,
> cmd=0x80ee980, conf=0x0) at src/http/ngx_http_file_cache.c:1598
> (gdb) p s
> $1 = {len = 6, data = 0x811e2a3 "10000m"}
> 1598 size = ngx_parse_size(&s);
> (gdb) p size
> $2 = 1895825408
> (gdb) n
> 1599 if (size > 8191) {
> (gdb) n
> 1600 continue;
> (gdb) quit
> [/code]
>
>
> Even being an unreasonable value for in-memory cache, shouldn't this
> unexpected result be avoided?

10485760000 is 0x271000000 in hex. On 32-bit platform it's truncated to
0x71000000, i.e., 1895825408. Yes, it should be checked.


--
Igor Sysoev
http://sysoev.ru/en/

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

Invalid parsed value for keys_zone. Is this a problem?

caruccio January 18, 2011 08:35AM

Re: Invalid parsed value for keys_zone. Is this a problem?

Igor Sysoev January 18, 2011 09:24AM

Re: Invalid parsed value for keys_zone. Is this a problem?

Eugaia January 18, 2011 09:32AM

Re: Invalid parsed value for keys_zone. Is this a problem?

Igor Sysoev January 18, 2011 09:44AM

Re: Invalid parsed value for keys_zone. Is this a problem?

Eugaia January 18, 2011 10:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 189
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