[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [monit] Monit fails to create PID file on restart
From: |
Martin Pala |
Subject: |
Re: [monit] Monit fails to create PID file on restart |
Date: |
Thu, 24 Jun 2010 12:17:22 +0200 |
The pidfile should be created either by the start script or started program
itself (in this case apache).
Are you sure that your apache instance creates the pidfile /var/run/httpd.pid?
The pidfile location depends on apache configuration (for example ubuntu uses
usually /var/run/apache2.pid which can be customized either via apache2.conf
PidFile statement or apache's envvars file APACHE_PID_FILE variable)
On Jun 24, 2010, at 11:49 AM, Tong Anh Quan wrote:
> Hi,
>
> Have you solved this problem? Today, the same thing happen to me. My
> monit.conf:
>
> check process apache with pidfile /var/run/httpd.pid
> start program = "/etc/init.d/httpd start"
> stop program = "/etc/init.d/httpd stop"
> if cpu > 60% for 2 cycles then alert
> if cpu > 80% for 5 cycles then restart
> if totalmem > 600.0 MB for 5 cycles then restart
>
> When the Apache reach the threshold, monit attempts to restart Apache without
> pid file, therefore it thinks Apache fails to start:
>
> [ICT Jun 24 12:50:19] error : 'apache' total mem amount of 647948kB
> matches resource limit [total mem amount>614402kB]
> [ICT Jun 24 12:50:20] info : 'apache' trying to restart
> [ICT Jun 24 12:50:20] info : 'apache' stop: /etc/init.d/httpd
> [ICT Jun 24 12:50:21] info : 'apache' start: /etc/init.d/httpd
> [ICT Jun 24 12:51:20] error : 'apache' process is not running
> [ICT Jun 24 12:51:20] error : 'apache' failed to start
>
> `pidof httpd` still return the parent and child's PID but there is no
> httpd.pid in /var/run.
> Additional:
> - monit start with root user
> - there is no error in Apache log
>
> Can anyone help me to debug this case? Thanks in advance.
>
>
> --
> --- Hạnh phúc là một ly Cafe và nhạc Trịnh ---
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
- Re: [monit] Monit fails to create PID file on restart, Tong Anh Quan, 2010/06/24
- Re: [monit] Monit fails to create PID file on restart,
Martin Pala <=
- Re: [monit] Monit fails to create PID file on restart, Tong Anh Quan, 2010/06/24
- Re: [monit] Monit fails to create PID file on restart, Martin Pala, 2010/06/24
- Re: [monit] Monit fails to create PID file on restart, Tong Anh Quan, 2010/06/24
- Re: [monit] Monit fails to create PID file on restart, Martin Pala, 2010/06/24
- Re: [monit] Monit fails to create PID file on restart, Tong Anh Quan, 2010/06/24
- Re: [monit] Monit fails to create PID file on restart, Martin Pala, 2010/06/24
- Re: [monit] Monit fails to create PID file on restart, Tong Anh Quan, 2010/06/29