Monit takes too long to start monitoring processes after restarting monit

Issue #870 resolved
Mayur created an issue

Why is monit taking around 2-3 minutes to start monitoring already running processes after restarting monit.

Even I set 1 cycle for 5 seconds as follows,

set daemon 5

check process my_process with pidfile /var/run/my_process.pid
    start program = "/etc/init.d/my_process start" with timeout 5 seconds
    stop program = "/etc/init.d/my_process stop" with timeout 5 seconds

it still takes couple of minutes to initiate the monitoring processes.

please find the screenshot.

Is there any possibility to overcome this problem.

Regards,

Mayur

Comments (6)

  1. Mayur reporter

    Hi Team monit,

    I found that, if I set “mailserver” and “alert” then monit takes couple of minutes to start monitoring.

    but if I don’t, it works seamlessly.

    is there any way to fix that delay causing by setting up “mailserver” and “alert”.

  2. Mayur reporter

    Thanks Henning for making me to see logs.

    problem is, my system is in restricted network form where I cannot access gmail.

    but as I set mailserver of gmail, monit was trying to connect to the smtp server of gmail (which is not allowed in my network).

    so it was trying multiple times causing the delay in monitoring already running services.

    So it requires an open network connection and then it works fine.

    thanks.

  3. Mayur reporter

    problem is, my system is in restricted network form where I cannot access gmail.

    but as I set mailserver of gmail, monit was trying to connect to the smtp server of gmail (which is not allowed in my network).

    so it was trying multiple times causing the delay in monitoring already running services.

    So it requires an open network connection and then it works fine.

  4. Log in to comment