[Supervisor-users] Harvesting stale application processes

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Supervisor-users] Harvesting stale application processes

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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] Harvesting stale application processes

Andres Reyes
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)


On Thu, May 8, 2014 at 9:15 AM, Sergey Maslyakov <[hidden email]> wrote:
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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users




--
Andrés Reyes Monge
[hidden email]
https://coderwall.com/armonge
+(505)-8873-7217

_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] Harvesting stale application processes

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.


On Thu, May 8, 2014 at 9:11 AM, Andres Reyes Monge <[hidden email]> wrote:
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)


On Thu, May 8, 2014 at 9:15 AM, Sergey Maslyakov <[hidden email]> wrote:
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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users




--
Andrés Reyes Monge
[hidden email]
https://coderwall.com/armonge
<a href="tel:%2B%28505%29-8873-7217" value="+50588737217" target="_blank">+(505)-8873-7217

_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users



_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] Harvesting stale application processes

Dustin Oprea
On Thu, May 8, 2014 at 2:49 PM, Roger Hoover <[hidden email]> wrote:
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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] Harvesting stale application processes

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


On Thu, May 8, 2014 at 3:03 PM, Dustin Oprea <[hidden email]> wrote:
On Thu, May 8, 2014 at 2:49 PM, Roger Hoover <[hidden email]> wrote:
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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users



_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] Harvesting stale application processes

Sergey Maslyakov
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


On Thu, May 8, 2014 at 10:48 PM, Sergey Maslyakov <[hidden email]> wrote:
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


On Thu, May 8, 2014 at 3:03 PM, Dustin Oprea <[hidden email]> wrote:
On Thu, May 8, 2014 at 2:49 PM, Roger Hoover <[hidden email]> wrote:
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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users




_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users