-
Notifications
You must be signed in to change notification settings - Fork 119
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
all processes are killed if one process exits #167
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I wasn’t able to find anything in the documentation describing this behavior. Is this expected? |
@jmcantrell I don't maintain this package, but for anyone else out there that wants to use this package and follow the pattern that Heroku is using, here you go. Looking at https://devcenter.heroku.com/articles/release-phase#specifying-release-phase-tasks, it looks like Heroku altered the Procfile format to include a specific process that runs only during the release phase on their platform. This breaks the idea behind the Procfile, which includes only long-running processes. If any of those processes exists, all processes exit. Why? So you can fix the reason why the service quit :) To mimic the Heroku experience, you need to include each process in the Procfile in your command line. Given the following Procfile (which builds off of your example):
For your example, above, it would look like When you want to invoke the Throw those in your yarn scripts or somewhere convenient. References: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I first noticed this when implementing a "release" task in my procfile for a heroku app.
https://devcenter.heroku.com/articles/release-phase#specifying-release-phase-tasks
According to that document, the Procfile spec should be ok with having a short-lived process run alongside a long-lived one. I've not used any other implementation of foreman, and I'm not sure which one is being used on heroku.
I can see here that a killall signal is being emitted whenever a child process exits. It seems intentional, but I'm trying to understand why that would be the desired behavior.
https://github.com/strongloop/node-foreman/blob/master/lib/proc.js#L50-L54
My test case is as follows:
In
Procfile
:In
release.js
:In
server.js
:And see that all processes are killed when running
nf start
. If therelease
process is removed, you'll notice that the server is not killed.The text was updated successfully, but these errors were encountered: