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

service supervisord restart - it doesn't kill old processes, just add new #600

Closed
reggin opened this issue Mar 30, 2015 · 17 comments
Closed

Comments

@reggin
Copy link

reggin commented Mar 30, 2015

Then I have each program duplication.

@reggin reggin changed the title service supervisord restart - doesn't kill old processes, just add new service supervisord restart - it doesn't kill old processes, just add new Mar 30, 2015
@reggin reggin closed this as completed Mar 30, 2015
@andriytkachiv
Copy link

I also have this issue, how to fix this?

@enstain
Copy link

enstain commented Mar 16, 2017

@andriytkachiv Any luck with it?

@enstain
Copy link

enstain commented Mar 16, 2017

That's the working solution after all:

  1. Manually kill all your old processes

  2. Also ask supervisor stop all processes just to be sure we are on a fresh start

    sudo supervisorctl stop all

  3. Put two new parameters into config belongs to your process with <your_process> name

    #/etc/supervisorctl/conf.d/your_process.conf
    
    [program:<your_process>]
    ...
    stopasgroup=true
    stopsignal=QUIT
    
  4. Make sure supervisor has updated your config:

    sudo supervisorctl reread

    sudo supervisorctl update

  5. Start your process

    sudo supervisorctl start <your_process>

  6. Check you have no zombies at the process list after supervisorctl restart <your_process> by ps aux | grep "whatever indicates your process"

@hyp3rv1p3r
Copy link

Helped me to solve the issue, thanks.

@kjunggithub
Copy link

@enstain Thanks, works great!

@fiatjaf
Copy link

fiatjaf commented Apr 24, 2018

The workaround doesn't work here. The processes are not killed. There isn't a notice about the fact that the processes aren't killed either.

Shouldn't this be a basic feature?

@MihaelIsaev
Copy link

MihaelIsaev commented May 7, 2018

@enstain solution works for me, thanks!

@proohit
Copy link

proohit commented May 30, 2019

@enstain solution worked for me too, thank you !!

@sayhicoelho
Copy link

Using kill <PID> worked for me.

@sorenwacker
Copy link

Manually kill all your old processes

how to find those??

@proohit
Copy link

proohit commented Dec 9, 2019

Manually kill all your old processes

how to find those??

Try
ps -A
This will display all running processes.
e.g.
ps -A | grep java
Will display all Java processes.

@chrisspen
Copy link

Why was this closed? Supervisor still has this bug. The basic "stop" action does not stop processes. That's a massive problem.

@MihaelIsaev
Copy link

@chrisspen as I see supervisor works well, but some programs won't stop on SIGTERM so we have to specify in config stopsignal=QUIT to let supervisor know that it should stop the program with SIGKILL.

@tejit2004
Copy link

No, adding stopsignal=QUIT and stopasgroup=true , still doesn't kills the process.

@muslu
Copy link

muslu commented Jan 20, 2023

Still doesn't work.

Maybe we can use killall like this command = bash -c "killall -9 pypy3; pypy3 -m hypercorn main:app" but it is not true way.

@chrisspen
Copy link

Yeah, for now, my workaround is also to run a killall command, but that's obviously a hack since supervisor purports to stop it's processes, which it's not.

@jedmund
Copy link

jedmund commented Aug 25, 2023

I'm running into this problem with Next.js 13. It worked fine in Next.js 12 b ut something has changed and stopsignal=TERM has stopped working. No matter what I do, I can't get supervisor to kill the process anymore.

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

No branches or pull requests