Is it possible to restart Unicorn without downtime?

(Earl Patrick Bajao) #1


I know that we can use sv stop unicorn then sv start unicorn to restart unicorn workers. But that will cause downtime. Killing the master with a USR2 signal is the usual way to do hot restart, as far as I know. Is it still safe to do that for Discourse? Or is there a better way to do this?

I understand that I rarely (or not at all) have to do this. But just want to know in case of emergency.


(Sam Saffron) #2

Sort of, we do:

So you would send the USR2 to the unicorn launcher that will forward the signal for you.

(Earl Patrick Bajao) #3

Ah. Sweet! That will do it. Thanks @sam! :slight_smile:

(Alan Tan) #4

USR2 - reexecute the running binary. A separate QUIT should be sent to the original process once the child is verified to be up and running.

@sam According to the docs, don’t we need to send a QUIT as well?

(Sam Saffron) #5

Nope cause of: