Discussion:
[Supervisor-users] Harvesting stale application processes
Sergey Maslyakov
2014-05-08 15:15:14 UTC
Permalink
Hello,

I have an error-handling question about supervisord.

In case if supervisord crashes or exits abnormally, and then it is
restarted, would the new instance of supervisord be able to harvest the
process list and to continue monitoring processes started by its
predecessor?

Or would it try to spin off a new set of instances of applications that it
manages; thus, possibly destabilizing the system?


Thank you,
/Sergey
Andres Reyes Monge
2014-05-08 16:11:39 UTC
Permalink
A new instance of supervisord will try to spin a new set of instances, the
way it works is by creating the applications as childs of the main
supervisord process. However i also believe that in the event supervisord
crashes it will kill all of it's children (not sure about that)
Post by Sergey Maslyakov
Hello,
I have an error-handling question about supervisord.
In case if supervisord crashes or exits abnormally, and then it is
restarted, would the new instance of supervisord be able to harvest the
process list and to continue monitoring processes started by its
predecessor?
Or would it try to spin off a new set of instances of applications that it
manages; thus, possibly destabilizing the system?
Thank you,
/Sergey
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
--
Andrés Reyes Monge
***@gmail.com
https://coderwall.com/armonge
+(505)-8873-7217
Roger Hoover
2014-05-08 18:49:29 UTC
Permalink
If supervisor dies, I think it's child processes will be orphaned and need
to be killed manually. A new instance of supervisord will spawn a new set
of children.
Post by Andres Reyes Monge
A new instance of supervisord will try to spin a new set of instances, the
way it works is by creating the applications as childs of the main
supervisord process. However i also believe that in the event supervisord
crashes it will kill all of it's children (not sure about that)
Post by Sergey Maslyakov
Hello,
I have an error-handling question about supervisord.
In case if supervisord crashes or exits abnormally, and then it is
restarted, would the new instance of supervisord be able to harvest the
process list and to continue monitoring processes started by its
predecessor?
Or would it try to spin off a new set of instances of applications that
it manages; thus, possibly destabilizing the system?
Thank you,
/Sergey
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
--
Andrés Reyes Monge
https://coderwall.com/armonge
+(505)-8873-7217
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Dustin Oprea
2014-05-08 20:03:41 UTC
Permalink
Post by Roger Hoover
If supervisor dies, I think it's child processes will be orphaned and need
to be killed manually. A new instance of supervisord will spawn a new set
of children.
1+



Dustin
Sergey Maslyakov
2014-05-09 03:48:49 UTC
Permalink
Thank you all for the answers! Indeed, there is no code in the start up
sequence that could find "stale" children and bestow the monitoring on them.


/Sergey
Post by Dustin Oprea
Post by Roger Hoover
If supervisor dies, I think it's child processes will be orphaned and
need to be killed manually. A new instance of supervisord will spawn a new
set of children.
1+
Dustin
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Sergey Maslyakov
2014-05-09 20:46:27 UTC
Permalink
On a related note, documentation says that supervisord relies on SIGCHLD to
be notified of a monitored process termination:
http://supervisord.org/subprocess.html

However, in the code I see that SIGCHLD is swallowed with a mere log
message, while the actual mechanism seems to rely on a file descriptor
activity when the pipe connected to stdout of a child process closes.

Which way is really in use?

In either case, I believe it is next to impossible to take ownership of
monitoring processes that were not started by the current instance of
supervisord.


Regards,
/Sergey
Post by Sergey Maslyakov
Thank you all for the answers! Indeed, there is no code in the start up
sequence that could find "stale" children and bestow the monitoring on them.
/Sergey
Post by Dustin Oprea
Post by Roger Hoover
If supervisor dies, I think it's child processes will be orphaned and
need to be killed manually. A new instance of supervisord will spawn a new
set of children.
1+
Dustin
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Loading...