Skip to content
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

restart doesn't restart processes #7

Open
luislavena opened this issue Dec 12, 2012 · 6 comments
Open

restart doesn't restart processes #7

luislavena opened this issue Dec 12, 2012 · 6 comments

Comments

@luislavena
Copy link

Hello,

I've been testing mongroup locally on my OSX 10.8 box before deploying this to production and encountered a minor issue with restart.

I have this basic config:

pids = tmp/pids
logs = log
worker = rake resque:work QUEUE=main,ts_delta
apn = rake apn:sender QUEUE=apple_push_notifications

When started with mongroup, everything is ok:

$ mongroup -c config/mongroup.conf status

      worker : 4093 : alive : uptime 7 seconds
         apn : 4096 : alive : uptime 7 seconds

But when done a restart

$ mongroup -c config/mongroup.conf restart

        stop : worker
        stop : apn
     running : worker
     running : apn

The child processes are terminated and never get up again, so status reports them dead:

$ mongroup -c config/mongroup.conf status

      worker : 4093 : dead
         apn : 4096 : dead

And using ps to verify I confirm they are dead 👅

Last time I checked resque did work properly for this (used with foreman and Procfiles) so I think it respond properly to process termination signals.

Thank you for creating this tool! ❤️ ❤️ ❤️

@luislavena
Copy link
Author

Forgot to mention that as a workaround I'm doing:

mongroup -c config/mongroup.conf stop && sleep 5 && mongroup -c config/mongroup.conf start

Resque takes time to terminate, so perhaps that is causing the issue with restart?

@jgallen23
Copy link
Owner

I think it's because of the ='s in your config file. There is a pull request open that should fix that

@matthewmueller
Copy link
Contributor

+1, running into this as well. Also have an = in the config file for passing vars through.

@jgallen23
Copy link
Owner

try now. I just published 0.4.0

@juliangruber
Copy link

I have this problem too and I'm pretty sure it's because the process takes too long to quit.

what about adding wait $PID after the kill $PID in stop?

@juliangruber
Copy link

when mon is killed with SIGQUIT it dies before its watched process dies...

However, if i change the sleep in restart to wait for 5 seconds it works. So, the time the process takes to exit is the cause for the restart not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants