understanding respawn limit
Hi,
I am running upstart 0.5 and have a question about the respawn option.
I have started init with the debug option.
My job file looks like this
***/etc/
start on emit_job2
respawn limit 4 500
exec bin/sleep 200
From the console, I do the following
initctl emit emit_job2
I then get the pid of job2 (sleep) and kill it. I expect it to be respawned but it does not.
I am trying to understand how the respawn limit should work. From the front page, the documentation says
"The respawn limits function as follows: If the process is respawned more than count times within an interval of timeout seconds, the process will be stopped automatically, and not restarted. Unless set explicitly, the limit defaults to 10 times within 5 seconds. "
Here is what i see in the /var/log/messages
Aug 23 10:01:28 10 <1219485688,
Aug 23 10:01:30 10 <1219485690,
Aug 23 10:01:33 10 <1219485690,
Aug 23 10:01:33 10 <1219485690,
Aug 23 10:01:33 10 <1219485690,
Aug 23 10:01:34 10 <1219485690,
Aug 23 10:01:34 10 <1219485690,
Aug 23 10:01:35 10 <1219485695,
Aug 23 10:01:35 10 <1219485695,
Aug 23 10:01:35 10 <1219485695,
Aug 23 10:01:36 10 <1219485695,
Aug 23 10:02:53 10 <1219485773,
Aug 23 10:02:53 10 <1219485773,
Aug 23 10:02:53 10 <1219485773,
Aug 23 10:02:54 10 <1219485773,
Aug 23 10:02:54 10 <1219485773,
Aug 23 10:02:54 10 <1219485773,
Aug 23 10:02:55 10 <1219485773,
Aug 23 10:02:55 10 <1219485773,
.
My understanding on "respawn limit 4 500" is as follows.
if the process is restarted more than 4 times within 500 seconds, the process should be stopped automatically.
This however does not happen.
Is this a bug?
If i use respawn without the limit option, the process gets respawned.
Thanks,
Sandeep
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- upstart Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Sandeep for more information if necessary.