[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Restarting service on http request timeout

From: Fabio Bozzo
Subject: Restarting service on http request timeout
Date: Wed, 14 Sep 2016 09:46:11 +0200

One of my monit configuration files looks like that:

check process lucee with pidfile /opt/lucee/tomcat/work/

        start program = "/etc/init.d/lucee_ctl start" with timeout 60 seconds
        stop program  = "/etc/init.d/lucee_ctl stop"

        if failed host port 80 with protocol http
        and request "/"
        with timeout 10 seconds
        then restart

It actually works when process crashes or is killed.

Unfortunately, the second part doesn't work at all!

I want monit to ping the homepage of my website and restart immediately in case it takes more than 10 seconds to give a response.

I tried putting a "sleep(15)" in the homepage to simulate performance degradation, with no luck: I didn't see anything happening in monit.log.

Thank you

reply via email to

[Prev in Thread] Current Thread [Next in Thread]