Uncontrolled change of cycle length

Issue #536 on hold
Former user created an issue

I have 2 elements that I am trying to monitor. One is declared as a program and other is declared as a process. The program is automatically started and the process is started manually. The cycle length is defined to 10s using monitrc config file.

When starting only the program the cycle length is 10s as configured. It is confirmed by the timestamp in the traces monit.log. But when starting the process, the cycle length is changing from 10s to ~40s.

Here my process and program are only doing an single action and not staying alive but in my mind in must not have any impact.

Am i missing something or doing something bad?

I am using a 5.19.0 version on a Linux (Ubuntu 16.04) target.

Thanks!

Comments (3)

  1. Tildeslash repo owner

    Monit performs all tests serially and then goes to sleep for the given time between cycles. The time between tests will be always "time used by all tests" + "poll cycle length". We will add new tests scheduler in the future, which will run the tests in parallel and with exact interval.

  2. Former user Account Deleted

    Thanks for your quick answer!

    Ok, I understand the additional time. But which value exactly are these 30s coming from? Is it a sort of timeout value? I mean my process/programs are very short actions (1 line) so 30s is large. Is this value configurable somewhere?

    Nice idea to run the tests in parallel! In particular in case of large number of tests that could give a lot of impacts to this time between tests.

  3. Tildeslash repo owner

    The 30 seconds is related to the start program timeout:

    [CET Jan  5 11:48:57] error    : 'my_process' process is not running
    [CET Jan  5 11:48:57] info     : 'my_process' trying to restart
    [CET Jan  5 11:48:57] info     : 'my_process' start: /tmp/my_process.sh
    [CET Jan  5 11:48:57] debug    : hello!
    [CET Jan  5 11:49:27] error    : 'my_process' failed to start (exit status 0) -- /tmp/my_process.sh: hello!
    

    Monit detected that the "my_process" is not running and tries to start it by executing the start method - it then waits for up to 30 seconds for the program to show up in the process table. If it doesn't start within 30 seconds, the start attempt times out and monit continues.

    To solve the problem, fix the start method for "my_process".

  4. Log in to comment