On 16. aug. 2007, at 00.09, Jovan Kostovski wrote:
So I suppose to free the "eaten" memory, you'll probably have to
monitor and restart Apache, but this can be tricky. You can configure
monit to restart Apache
whenever it goes over the limit for memory usage, but you'll never
know the exact time when the restart will happen. This will result in
downtime and not handled request at random time moments. Because of
this, I think the best thing to do is to find out in which period of
the day the network traffic to the server is low and to cron a restart
in these hours, i.e. 3-4AM.
A hack that comes to mind is to have an extra check for only Fast CGI
related memory problems and then execute a program that takes down
only Fast CGI processes. Something like:
# Regular apache check entry
check process apache with pidfile /var/run/apache2.pid
start program = "/etc/init.d/apache2 start"
stop program = "/etc/init.d/apache2 stop"
[...]
# Check memory of Apache and its children and kill Fast CGI related
processes
# if memory consumption is over a certain threshold
check process wwsympa.fcgi with pidfile /var/run/apache2.pid
if totalmem > 1500 MB for 3 cycles then exec "/usr/bin/pkill
wwsympa.fcgi"
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general