0

I have supervisor that is handling a queue process that is dependent on Redis being available. When I restart the server (Ubuntu 18.04) the Redis server is quitting before Supervisor and the queue process spams me with hundreds of errors in Slack because of the missing Redis server.

I need to set Supervisor quit before the other services that are used in the subprocesses of Supervisor so I do not get all these errors. I know it should be in the systemd but haven't done it so far and couldn't find a good way to find it in Google.

0
0

systemd inverts the start order during stopping. I.e. if you have your supervisor service unit with After=redis then supervisor will be stopped before redis on shutdown. (Or alternatively add Before=supervisor to the redis service unit).

From info systemd.unit

Before=, After=

[...] Note that when two units with an ordering dependency between them are shut down, the inverse of the start-up order is applied. [...]

Not the answer you're looking for? Browse other questions tagged or ask your own question.