-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reap Children when run as PID1 #62
Comments
I want to be very careful about this subject -- we're very specifically not supporting the whole pile of things that modern supervisors do. Even the idea of just taking on reaping children is dubious; if you're in a spot where this is a problem then the application probably isn't being configured correctly (ex. running Nginx in daemon mode) or you should be using a "real" supervisor with all the features that entails. |
Containerbuddy shouldn't be an init system a la systemd or upstart, but reaping children is the only required responsibility of PID1. Since the configuration lets you run arbitrary commands for check health and onStart - they may spawn background processes which would require reaping. I'm not saying thats a good idea or not, but it's possible. |
Ok, that's fair. Adding the
In addition to the signal handler, don't init systems usually hit |
From what I've read, I think we can use either or. Doing both might be overkill? I'd have to survey more init systems to see which is used most often. See:
|
The dumb-init approach will work for our main application because it's the one that forks that process. But it's the ones in the "side loops" like the I have a minor tweak I want to do to keep Containerbuddy from using up a lot of threads in an environment like Triton where naive M:N with cause resource contention (i.e we actually don't want to set |
I spent a little more time reading the reference material last night and I think the |
#71 has been merged and this is awaiting release. |
Released in RC: https://github.com/joyent/containerbuddy/releases/tag/0.1.1 |
Containerbuddy should be performing the duties of the init process if it is run as PID1: Reaping child processes.
One possible way to do this is by using this go library:
https://github.com/ramr/go-reaper
Although since Containerbuddy is already handling signals, we can just run
The text was updated successfully, but these errors were encountered: