On Thu, Feb 21, 2008 at 08:17:01PM +0100, Todd HG wrote:
Of course disabling gzip defeats the purpose of having gzip decrease
MaxRequestsPerChild limit setting. There should be a way to set Nginx to
kill and restart the worker process to free the RAM, and start again at
zero for situations like mine.
Could you show what does
ps ax -o pid,ppid,%cpu,vsz,rss,wchan,command|egrep ‘(nginx|PID)’
show when nginx grows up ?
What OS do you use ?
Without a solution I need to restart my server about every 24 hours, and
this is a very robust server.
It’s really strange. I run all my sites unattended. The workers are
restarted
only for reconfiguration or online upgrade. For example, this nginx
runs more than 2 days (static, SSI, gzipping, proxying) without any
leaks (60-120M is stable state):
ps ax -o pid,ppid,%cpu,vsz,lstart,wchan,command|egrep ‘(nginx|PID)’
PID PPID %CPU VSZ STARTED WCHAN COMMAND
1645 1 0.0 16520 Mon Feb 18 02:16:37 2008 pause nginx: master
proces
66458 1645 24.9 78984 Tue Feb 19 18:10:20 2008 kqread nginx: worker
proces
Now it handles 22000 simultaneous connections:
fstat | grep ‘nginx.*tcp’ | awk ‘{print $3}’ | sort | uniq -c
8 1645
22013 66458
16 hours per day it handles 1000-2000 requests per seconds.
This is 60-100 millions per day.