Hi to all,
Solved the last problem with httpd and monit.
because monit does NOT kill all httpd instances and does just a PID kill i have made some modifications to work as it sould.
First of all i have to mention that this tweak is made on a Fedora Release 12.
In /etc/monit.conf i have this:
check process httpd with pidfile /var/run/httpd/httpd.pid
start program = "/usr/bin/restart-apache"
stop program = "/etc/init.d/httpd stop"
if failed host 127.0.0.1 port 80 protocol http
and request "/monit/token" then restart
if cpu is greater than 50% for 2 cycles then alert
if cpu > 70% for 5 cycles then restart
if totalmem > 900 MB for 5 cycles then restart
if children > 450 then restart
if loadavg(5min) greater than 10 for 8 cycles then stop
if 3 restarts within 5 cycles then timeout
/usr/bin/restart-apache has the following inside:
killall -9 /usr/sbin/httpd;
service httpd restart;
Now monit does what i need and work's perfect.
If is there someone with problems i will be glad to help him.