No PID and related status data after service restart

Issue #367 resolved
Ulrich Windl created an issue

When explicitly restarting a service though monit that uses a PID file (check process .. with pidfile ..), the following problem was observed: The service was displayed as "Running" and "Monitored", but no PID and related data were shown (Just a "-" instead). Only after some extra time (a polling cycle or timeout time?) the PID and related data was shown. I think once the status is "Running" the PID should be valid and known.

Comments (7)

  1. Tildeslash repo owner

    When you restart the process, monit waits for the process to start (so it can display that the process is Running or to see if the restart failed), but the particular process properties and tests are not performed immediately - they are done per schedule (next monitoring cycle). Until the service goes through the validation cycle, there are no data to display (represented as "-").

  2. Ulrich Windl reporter

    So "Running" does not mean the process is running and has a PID (otherwise monit would know the PID), but "Starting" (start action perfomed successfully, but no status/monitor yet)? It's a bit confusing at least.

  3. Tildeslash repo owner

    In "Running" state the process has PID and is really running, just the process info structure is populated later. I understand it is confusing, will fix.

  4. Tildeslash repo owner

    Fix Issue #367 : When process is restarted, monit showed the process as Running, but no process info such as PID was displayed until the service passed regular validation cycle.

    → <<cset 685e04d670cf>>

  5. Log in to comment