# Proxy\_cache\_path growing beyond max\_size

**URL:** <https://www.ruby-forum.com/t/proxy-cache-path-growing-beyond-max-size/210899>\
**Category:** NGINX\
**Created:** [August 19, 2011, 9:11pm UTC](https://www.ruby-forum.com/t/proxy-cache-path-growing-beyond-max-size/210899 "2011-08-19T21:11:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [August 19, 2011, 9:11pm UTC](https://www.ruby-forum.com/t/proxy-cache-path-growing-beyond-max-size/210899/1 "2011-08-19T21:11:52Z")

</div>

Hi,

I’ve read documentation about proxy\_cache\_path, proxy\_temp\_path and  
client\_body\_temp\_path directives but I’m a bit confused about proxy  
cache size and clean up cache manager process. Using tools like skipfish  
to test website security give me lot of 404 errors, which is a normal,  
but setting proxy\_cache\_valid to a tiny value, around 1m, always causes  
cache increased beyond limits. So, here is my settings:

proxy\_cache\_path /var/cache/proxy/proxy\_cache levels=2:2:2  
keys\_zone=cache\_local:2m max\_size=200m inactive=1d;  
client\_body\_temp\_path /var/cache/proxy/client\_body\_temp 2 2 2  
proxy\_temp\_path /var/cache/proxy/proxy\_temp 2 2 2;

proxy\_cache\_path always grows above 200m and fill up entire FS until it  
runs out of space. Is cache manager process should keep it with enough  
space, right? What am I doing wrong ?

Regards.

Posted at Nginx Forum:

> **[proxy\_cache\_path growing beyond max\_size](https://forum.nginx.org/read.php?2,214067,214067#msg-214067)**
>
> Hi, I've read documentation about proxy\_cache\_path, proxy\_temp\_path and client\_body\_temp\_path directives but I'm a bit confused about proxy cache size and clean up cache manager process. Using tools like skipfish to test website security give me lot...

---

<div class="post-metadata">

**Author:** ![morpheu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@morpheu](https://www.ruby-forum.com/u/morpheu)\
**Post date:** [August 25, 2011, 5:32pm UTC](https://www.ruby-forum.com/t/proxy-cache-path-growing-beyond-max-size/210899/2 "2011-08-25T17:32:26Z")

</div>

## morpheu Wrote:

> So, here is my settings:  
> up entire FS until it runs out of space. Is cache  
> manager process should keep it with enough space,  
> right? What am I doing wrong ?
> 
> Regards.

I’ve been seeing this today aswell. The cache manager process isn’t  
running.

2011/08/24 15:50:20 [notice] 10723#0: signal 1 (SIGHUP) received,  
reconfiguring  
2011/08/24 15:50:20 [notice] 10723#0: reconfiguring  
2011/08/24 15:50:20 [notice] 10723#0: using the “epoll” event method  
2011/08/24 15:50:20 [notice] 10723#0: start worker processes  
2011/08/24 15:50:20 [notice] 10723#0: start worker process 14266  
2011/08/24 15:50:20 [notice] 10723#0: start worker process 14267  
2011/08/24 15:50:20 [notice] 10723#0: start cache manager process 14268  
2011/08/24 15:50:20 [alert] 14268#0: epoll\_ctl(1, 0) failed (1:  
Operation not permitted)  
2011/08/24 15:50:20 [alert] 14268#0: failed to register channel handler  
while initializing push module worker (1: Operation not permitted)  
2011/08/24 15:50:20 [notice] 10723#0: start cache loader process 14269  
2011/08/24 15:50:21 [notice] 13923#0: gracefully shutting down  
2011/08/24 15:50:21 [notice] 13924#0: gracefully shutting down  
2011/08/24 15:50:20 [alert] 14269#0: epoll\_ctl(1, 0) failed (1:  
Operation not permitted)  
2011/08/24 15:50:20 [alert] 14269#0: failed to register channel handler  
while initializing push module worker (1: Operation not permitted)  
2011/08/24 15:50:21 [notice] 10723#0: signal 17 (SIGCHLD) received  
2011/08/24 15:50:21 [notice] 10723#0: cache manager process 14268 exited  
with code 2  
2011/08/24 15:50:21 [alert] 10723#0: cache manager process 14268 exited  
with fatal code 2 and can not be respawn  
2011/08/24 15:50:21 [notice] 10723#0: signal 17 (SIGCHLD) received  
2011/08/24 15:50:21 [notice] 10723#0: cache loader process 14269 exited  
with code 2  
2011/08/24 15:50:21 [notice] 10723#0: signal 29 (SIGIO) received

proxy\_cache\_path /var/www/cache/downloads levels=1:1:1  
keys\_zone=downloads:1m max\_size=6144m inactive=45m;  
proxy\_cache\_valid 200 25m;  
proxy\_cache\_valid 404 1m;

What’s really quite odd is the disk usage doesn’t just go up, it goes  
down occasionally too!

This is nginx-extras-1.1.0-1 from debian testing.

Mike

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,214067,214262#msg-214262](http://forum.nginx.org/read.php?2,214067,214262#msg-214262)

---

<div class="post-metadata">

**Author:** ![morpheu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@morpheu](https://www.ruby-forum.com/u/morpheu)\
**Post date:** [August 25, 2011, 5:44pm UTC](https://www.ruby-forum.com/t/proxy-cache-path-growing-beyond-max-size/210899/3 "2011-08-25T17:44:46Z")

</div>

Hello!

On Thu, Aug 25, 2011 at 11:31:36AM -0400, gaima wrote:

> > setting proxy\_cache\_valid to a tiny value, around
> 
> 2011/08/24 15:50:20 [alert] 14268#0: failed to register channel handler  
> while initializing push module worker (1: Operation not permitted)

This looks like push module related problem.

Maxim D.

---

<div class="post-metadata">

**Author:** ![morpheu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@morpheu](https://www.ruby-forum.com/u/morpheu)\
**Post date:** [September 16, 2011, 1:13pm UTC](https://www.ruby-forum.com/t/proxy-cache-path-growing-beyond-max-size/210899/4 "2011-09-16T13:13:32Z")

</div>

I have the same problem running nginx 1.0.6 from [dotdeb.org](http://dotdeb.org)

2011/09/16 13:08:50 [alert] 12610#0: epoll\_ctl(1, 0) failed (1:  
Operation not permitted)  
2011/09/16 13:08:50 [alert] 12610#0: failed to register channel handler  
while initializing push module worker (1: Operation not permitted)  
2011/09/16 13:08:50 [alert] 12611#0: epoll\_ctl(1, 0) failed (1:  
Operation not permitted)  
2011/09/16 13:08:50 [alert] 12611#0: failed to register channel handler  
while initializing push module worker (1: Operation not permitted)  
2011/09/16 13:08:50 [alert] 12608#0: cache manager process 12610 exited  
with fatal code 2 and can not be respawn

There are several posts in the Internet concerning the same problem but  
there is no solution 😕

> <https://github.com/slact/nchan/issues/33>
>
> If I compile the NHPM module, I cannot force the nginx master process to re-read… the configuration file by sending SIGHUP signal to it. Nginx's worker processes on my box run as
> non privileged user.
> \# nginx -v
> 
> nginx version: nginx/0.7.64
> 
> Here is log from the error\_log
> \# cat /var/log/nginx/comet/error\_log | tail -n 30
> 
> 2009/11/23 23:23:02 \[info\] 25539#0: \*15 client 127.0.0.1 closed keepalive connection
> 2009/11/23 23:25:20 \[notice\] 25538#0: signal 1 (SIGHUP) received, reconfiguring
> 2009/11/23 23:25:20 \[notice\] 25538#0: reconfiguring
> 2009/11/23 23:25:20 \[info\] 25538#0: Using 131072KiB of shared memory for push module in /usr/local/nginx/comet.conf:134
> 2009/11/23 23:25:20 \[notice\] 25538#0: using the "epoll" event method
> 2009/11/23 23:25:20 \[notice\] 25538#0: start worker processes
> 2009/11/23 23:25:20 \[notice\] 25538#0: start worker process 25594
> 2009/11/23 23:25:20 \[notice\] 25538#0: start worker process 25595
> 2009/11/23 23:25:20 \[notice\] 25539#0: gracefully shutting down
> 2009/11/23 23:25:20 \[notice\] 25539#0: exiting
> 2009/11/23 23:25:20 \[notice\] 25539#0: exit
> 2009/11/23 23:25:20 \[alert\] 25594#0: epoll\_ctl(1, 0) failed (1: Operation not permitted)
> 2009/11/23 23:25:20 \[alert\] 25594#0: failed to register channel handler while initializing push module worker (1: Operation not permitted)
> 2009/11/23 23:25:20 \[notice\] 25538#0: signal 17 (SIGCHLD) received
> 2009/11/23 23:25:20 \[notice\] 25540#0: gracefully shutting down
> 2009/11/23 23:25:20 \[notice\] 25538#0: worker process 25539 exited with code 0
> 2009/11/23 23:25:20 \[notice\] 25540#0: exiting
> 2009/11/23 23:25:20 \[notice\] 25540#0: exit
> 2009/11/23 23:25:20 \[alert\] 25595#0: epoll\_ctl(1, 0) failed (1: Operation not permitted)
> 2009/11/23 23:25:20 \[alert\] 25595#0: failed to register channel handler while initializing push module worker (1: Operation not permitted)
> 2009/11/23 23:25:20 \[notice\] 25538#0: signal 17 (SIGCHLD) received
> 2009/11/23 23:25:20 \[notice\] 25538#0: worker process 25594 exited with code 2
> 2009/11/23 23:25:20 \[alert\] 25538#0: worker process 25594 exited with fatal code 2 and can not be respawn
> 2009/11/23 23:25:20 \[notice\] 25538#0: signal 17 (SIGCHLD) received
> 2009/11/23 23:25:20 \[notice\] 25538#0: worker process 25540 exited with code 0
> 2009/11/23 23:25:20 \[notice\] 25538#0: signal 17 (SIGCHLD) received
> 2009/11/23 23:25:20 \[notice\] 25538#0: worker process 25595 exited with code 2
> 2009/11/23 23:25:20 \[alert\] 25538#0: worker process 25595 exited with fatal code 2 and can not be respawn
> 2009/11/23 23:26:01 \[notice\] 25538#0: signal 15 (SIGTERM) received, exiting
> 2009/11/23 23:26:01 \[notice\] 25538#0: exit

> **[ошибка "failed to register channel handler while initializing push module...](https://forum.nginx.org/read.php?21,185003,185003#msg-185003)**
>
> При запуске в логах пишется следующее 2011/03/23 01:22:31 \[info\] 4784#0: Using 32768KiB of shared memory for push module in /etc/nginx/nginx.conf:3141 2011/03/23 01:22:31 \[alert\] 4791#0: epoll\_ctl(1, 0) failed (1: Operation not permitted) 2011/03/

---

<div class="post-metadata">

**Author:** ![morpheu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@morpheu](https://www.ruby-forum.com/u/morpheu)\
**Post date:** [September 16, 2011, 1:38pm UTC](https://www.ruby-forum.com/t/proxy-cache-path-growing-beyond-max-size/210899/5 "2011-09-16T13:38:04Z")

</div>

I have the same problem here. How can we fix it?

Is this problem known by the developers?

Caching in general is working but without having a working cache manager  
I am afraid of running out of disk space…

Posted at Nginx Forum:

> **[Re: proxy\_cache\_path growing beyond max\_size](https://forum.nginx.org/read.php?2,214067,215296#msg-215296)**
>
> Hi, I've read documentation about proxy\_cache\_path, proxy\_temp\_path and client\_body\_temp\_path directives but I'm a bit confused about proxy cache size and clean up cache manager process. Using tools like skipfish to test website security give me lot...

---

<div class="post-metadata">

**Author:** ![morpheu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@morpheu](https://www.ruby-forum.com/u/morpheu)\
**Post date:** [September 16, 2011, 2:03pm UTC](https://www.ruby-forum.com/t/proxy-cache-path-growing-beyond-max-size/210899/6 "2011-09-16T14:03:59Z")

</div>

Hello!

On Fri, Sep 16, 2011 at 07:37:18AM -0400, philipp wrote:

> I have the same problem here. How can we fix it?
> 
> Is this problem known by the developers?
> 
> Caching in general is working but without having a working cache manager  
> I am afraid of running out of disk space…

Recompiling nginx without third party push module will solve it.  
If you want this to be fixed, you may want to CC push module  
author.

Maxim D.

---

<div class="post-metadata">

**Author:** ![morpheu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@morpheu](https://www.ruby-forum.com/u/morpheu)\
**Post date:** [September 16, 2011, 2:23pm UTC](https://www.ruby-forum.com/t/proxy-cache-path-growing-beyond-max-size/210899/7 "2011-09-16T14:23:47Z")

</div>

Hello,

Am 16.09.2011 13:13, schrieb Philipp H.:

> 2011/09/16 13:08:50 [alert] 12608#0: cache manager process 12610 exited  
> with fatal code 2 and can not be respawn
> 
> There are several posts in the Internet concerning the same problem but  
> there is no solution 😕
> 
> [Cannot reconfigure nginx by sending the SIGHUP signal (server reload) · Issue #33 · slact/nchan · GitHub](https://github.com/slact/nginx_http_push_module/issues/33)  
> [http://forum.nginx.org/read.php?21,185003,185003#msg-185003](http://forum.nginx.org/read.php?21,185003,185003#msg-185003)

if you cant fix this issue, take a look at the new  
http-push-stream-module

> **[GitHub - wandenberg/nginx-push-stream-module: A pure stream http push technology for your Nginx...](https://github.com/wandenberg/nginx-push-stream-module)**
>
> A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.

since version 0.3.0 it also supports long-polling and polling.

Alexander K.
