Supervisord removing a process after successfully running

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have the following configuration for a process to run continuously. Apparently, it works very fine but after few hours or sometimes few minutes, the process gets terminated.
Any kind of help is highly appreciated.
Supervisord Config:
[program:action_consumer]
process_name=%(program_name)s_%(process_num)02d
command = php /var/www/the_api/web/index.php actionCron
numprocs = 2
autostart=true
autorestart=true
user=console_api
redirect_stderr=true
stdout_logfile=/var/www/the_api/logs/action_consumer.log
RestartSec=3
Restart=3
WatchdogSec=3
OS Info:
Debian GNU/Linux 8 (jessie)
Log file:
The log file contains the following error:
FATAL state, too many start retries too quickly
Important:
It is obvious that the process terminates too quickly, it is my requirement. I don't want to run the script in an infinite loop. Is setting startretries a valid solution?
linux debian php process-management supervisord
add a comment |Â
up vote
0
down vote
favorite
I have the following configuration for a process to run continuously. Apparently, it works very fine but after few hours or sometimes few minutes, the process gets terminated.
Any kind of help is highly appreciated.
Supervisord Config:
[program:action_consumer]
process_name=%(program_name)s_%(process_num)02d
command = php /var/www/the_api/web/index.php actionCron
numprocs = 2
autostart=true
autorestart=true
user=console_api
redirect_stderr=true
stdout_logfile=/var/www/the_api/logs/action_consumer.log
RestartSec=3
Restart=3
WatchdogSec=3
OS Info:
Debian GNU/Linux 8 (jessie)
Log file:
The log file contains the following error:
FATAL state, too many start retries too quickly
Important:
It is obvious that the process terminates too quickly, it is my requirement. I don't want to run the script in an infinite loop. Is setting startretries a valid solution?
linux debian php process-management supervisord
Check logs in /var/www/the_api/logs/action_consumer.log file. You might get better idea. If you are not able to understand the logs, Please edit your question and post it in same.
â Nitesh B.
Apr 3 at 10:15
The error log just contains the output i have printed on the script using echo. Nothing else. @Nitesh
â Jason Kruger
Apr 6 at 7:29
If your service is getting terminated, logs must be getting generated somewhere. How about system logs ? Did you check the system logs ?
â Nitesh B.
Apr 6 at 7:54
I managed to print supervisor.log and it contains this error: FATAL state, too many start retries too quickly
â Jason Kruger
Apr 6 at 8:02
So as per your updated question, yes, you can use startretries option.
â Nitesh B.
Apr 6 at 8:09
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have the following configuration for a process to run continuously. Apparently, it works very fine but after few hours or sometimes few minutes, the process gets terminated.
Any kind of help is highly appreciated.
Supervisord Config:
[program:action_consumer]
process_name=%(program_name)s_%(process_num)02d
command = php /var/www/the_api/web/index.php actionCron
numprocs = 2
autostart=true
autorestart=true
user=console_api
redirect_stderr=true
stdout_logfile=/var/www/the_api/logs/action_consumer.log
RestartSec=3
Restart=3
WatchdogSec=3
OS Info:
Debian GNU/Linux 8 (jessie)
Log file:
The log file contains the following error:
FATAL state, too many start retries too quickly
Important:
It is obvious that the process terminates too quickly, it is my requirement. I don't want to run the script in an infinite loop. Is setting startretries a valid solution?
linux debian php process-management supervisord
I have the following configuration for a process to run continuously. Apparently, it works very fine but after few hours or sometimes few minutes, the process gets terminated.
Any kind of help is highly appreciated.
Supervisord Config:
[program:action_consumer]
process_name=%(program_name)s_%(process_num)02d
command = php /var/www/the_api/web/index.php actionCron
numprocs = 2
autostart=true
autorestart=true
user=console_api
redirect_stderr=true
stdout_logfile=/var/www/the_api/logs/action_consumer.log
RestartSec=3
Restart=3
WatchdogSec=3
OS Info:
Debian GNU/Linux 8 (jessie)
Log file:
The log file contains the following error:
FATAL state, too many start retries too quickly
Important:
It is obvious that the process terminates too quickly, it is my requirement. I don't want to run the script in an infinite loop. Is setting startretries a valid solution?
linux debian php process-management supervisord
edited Apr 6 at 8:05
asked Apr 3 at 6:37
Jason Kruger
11
11
Check logs in /var/www/the_api/logs/action_consumer.log file. You might get better idea. If you are not able to understand the logs, Please edit your question and post it in same.
â Nitesh B.
Apr 3 at 10:15
The error log just contains the output i have printed on the script using echo. Nothing else. @Nitesh
â Jason Kruger
Apr 6 at 7:29
If your service is getting terminated, logs must be getting generated somewhere. How about system logs ? Did you check the system logs ?
â Nitesh B.
Apr 6 at 7:54
I managed to print supervisor.log and it contains this error: FATAL state, too many start retries too quickly
â Jason Kruger
Apr 6 at 8:02
So as per your updated question, yes, you can use startretries option.
â Nitesh B.
Apr 6 at 8:09
add a comment |Â
Check logs in /var/www/the_api/logs/action_consumer.log file. You might get better idea. If you are not able to understand the logs, Please edit your question and post it in same.
â Nitesh B.
Apr 3 at 10:15
The error log just contains the output i have printed on the script using echo. Nothing else. @Nitesh
â Jason Kruger
Apr 6 at 7:29
If your service is getting terminated, logs must be getting generated somewhere. How about system logs ? Did you check the system logs ?
â Nitesh B.
Apr 6 at 7:54
I managed to print supervisor.log and it contains this error: FATAL state, too many start retries too quickly
â Jason Kruger
Apr 6 at 8:02
So as per your updated question, yes, you can use startretries option.
â Nitesh B.
Apr 6 at 8:09
Check logs in /var/www/the_api/logs/action_consumer.log file. You might get better idea. If you are not able to understand the logs, Please edit your question and post it in same.
â Nitesh B.
Apr 3 at 10:15
Check logs in /var/www/the_api/logs/action_consumer.log file. You might get better idea. If you are not able to understand the logs, Please edit your question and post it in same.
â Nitesh B.
Apr 3 at 10:15
The error log just contains the output i have printed on the script using echo. Nothing else. @Nitesh
â Jason Kruger
Apr 6 at 7:29
The error log just contains the output i have printed on the script using echo. Nothing else. @Nitesh
â Jason Kruger
Apr 6 at 7:29
If your service is getting terminated, logs must be getting generated somewhere. How about system logs ? Did you check the system logs ?
â Nitesh B.
Apr 6 at 7:54
If your service is getting terminated, logs must be getting generated somewhere. How about system logs ? Did you check the system logs ?
â Nitesh B.
Apr 6 at 7:54
I managed to print supervisor.log and it contains this error: FATAL state, too many start retries too quickly
â Jason Kruger
Apr 6 at 8:02
I managed to print supervisor.log and it contains this error: FATAL state, too many start retries too quickly
â Jason Kruger
Apr 6 at 8:02
So as per your updated question, yes, you can use startretries option.
â Nitesh B.
Apr 6 at 8:09
So as per your updated question, yes, you can use startretries option.
â Nitesh B.
Apr 6 at 8:09
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
In case the time frame for the race condition was less than a second so setting startretries=<number you want>. However you can set it to a much higher value if need be. Below is an example.
[program:test]
startretries=10
So supervisord will try to restart the script 10 times in a second? Can you explain this?
â Jason Kruger
Apr 6 at 8:15
No, not 10 times in a second. The number explains that supervisord will attempting to start the program before giving up and putting the process into an FATAL state. you can find more example "supervisord.org/â¦;
â Nitesh B.
Apr 6 at 9:44
How can be the startretries unlimited?
â Jason Kruger
Apr 9 at 14:39
add a comment |Â
up vote
0
down vote
Since the issue was of 0 second execution time. Most of the time the scripts executes within 0 seconds, so supervisor terminates it.
I resolved this issue by adding startsecs=0.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
In case the time frame for the race condition was less than a second so setting startretries=<number you want>. However you can set it to a much higher value if need be. Below is an example.
[program:test]
startretries=10
So supervisord will try to restart the script 10 times in a second? Can you explain this?
â Jason Kruger
Apr 6 at 8:15
No, not 10 times in a second. The number explains that supervisord will attempting to start the program before giving up and putting the process into an FATAL state. you can find more example "supervisord.org/â¦;
â Nitesh B.
Apr 6 at 9:44
How can be the startretries unlimited?
â Jason Kruger
Apr 9 at 14:39
add a comment |Â
up vote
0
down vote
In case the time frame for the race condition was less than a second so setting startretries=<number you want>. However you can set it to a much higher value if need be. Below is an example.
[program:test]
startretries=10
So supervisord will try to restart the script 10 times in a second? Can you explain this?
â Jason Kruger
Apr 6 at 8:15
No, not 10 times in a second. The number explains that supervisord will attempting to start the program before giving up and putting the process into an FATAL state. you can find more example "supervisord.org/â¦;
â Nitesh B.
Apr 6 at 9:44
How can be the startretries unlimited?
â Jason Kruger
Apr 9 at 14:39
add a comment |Â
up vote
0
down vote
up vote
0
down vote
In case the time frame for the race condition was less than a second so setting startretries=<number you want>. However you can set it to a much higher value if need be. Below is an example.
[program:test]
startretries=10
In case the time frame for the race condition was less than a second so setting startretries=<number you want>. However you can set it to a much higher value if need be. Below is an example.
[program:test]
startretries=10
answered Apr 6 at 8:11
Nitesh B.
3711417
3711417
So supervisord will try to restart the script 10 times in a second? Can you explain this?
â Jason Kruger
Apr 6 at 8:15
No, not 10 times in a second. The number explains that supervisord will attempting to start the program before giving up and putting the process into an FATAL state. you can find more example "supervisord.org/â¦;
â Nitesh B.
Apr 6 at 9:44
How can be the startretries unlimited?
â Jason Kruger
Apr 9 at 14:39
add a comment |Â
So supervisord will try to restart the script 10 times in a second? Can you explain this?
â Jason Kruger
Apr 6 at 8:15
No, not 10 times in a second. The number explains that supervisord will attempting to start the program before giving up and putting the process into an FATAL state. you can find more example "supervisord.org/â¦;
â Nitesh B.
Apr 6 at 9:44
How can be the startretries unlimited?
â Jason Kruger
Apr 9 at 14:39
So supervisord will try to restart the script 10 times in a second? Can you explain this?
â Jason Kruger
Apr 6 at 8:15
So supervisord will try to restart the script 10 times in a second? Can you explain this?
â Jason Kruger
Apr 6 at 8:15
No, not 10 times in a second. The number explains that supervisord will attempting to start the program before giving up and putting the process into an FATAL state. you can find more example "supervisord.org/â¦;
â Nitesh B.
Apr 6 at 9:44
No, not 10 times in a second. The number explains that supervisord will attempting to start the program before giving up and putting the process into an FATAL state. you can find more example "supervisord.org/â¦;
â Nitesh B.
Apr 6 at 9:44
How can be the startretries unlimited?
â Jason Kruger
Apr 9 at 14:39
How can be the startretries unlimited?
â Jason Kruger
Apr 9 at 14:39
add a comment |Â
up vote
0
down vote
Since the issue was of 0 second execution time. Most of the time the scripts executes within 0 seconds, so supervisor terminates it.
I resolved this issue by adding startsecs=0.
add a comment |Â
up vote
0
down vote
Since the issue was of 0 second execution time. Most of the time the scripts executes within 0 seconds, so supervisor terminates it.
I resolved this issue by adding startsecs=0.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Since the issue was of 0 second execution time. Most of the time the scripts executes within 0 seconds, so supervisor terminates it.
I resolved this issue by adding startsecs=0.
Since the issue was of 0 second execution time. Most of the time the scripts executes within 0 seconds, so supervisor terminates it.
I resolved this issue by adding startsecs=0.
edited May 17 at 12:18
Jeff Schaller
31.1k846105
31.1k846105
answered May 17 at 11:23
Jason Kruger
11
11
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435211%2fsupervisord-removing-a-process-after-successfully-running%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Check logs in /var/www/the_api/logs/action_consumer.log file. You might get better idea. If you are not able to understand the logs, Please edit your question and post it in same.
â Nitesh B.
Apr 3 at 10:15
The error log just contains the output i have printed on the script using echo. Nothing else. @Nitesh
â Jason Kruger
Apr 6 at 7:29
If your service is getting terminated, logs must be getting generated somewhere. How about system logs ? Did you check the system logs ?
â Nitesh B.
Apr 6 at 7:54
I managed to print supervisor.log and it contains this error: FATAL state, too many start retries too quickly
â Jason Kruger
Apr 6 at 8:02
So as per your updated question, yes, you can use startretries option.
â Nitesh B.
Apr 6 at 8:09