so after installing redis onto my ubuntu 20.04 server. Whenever I reboot. A stop job appears for Advanced key-value store. I believe this is part of redis but I don't know why it keeps appearing and taking so long. How do I stop it
so after installing redis onto my ubuntu 20.04 server. Whenever I reboot. A stop job appears for Advanced key-value store. I believe this is part of redis but I don't know why it keeps appearing and taking so long. How do I stop it
I had this issue too and the fix was pretty simple. You need to edit the redis service file defined by the command
systemctl show -P FragmentPath redis.service
:Look for the line that contains
TimeoutStopSec
and set it to the maximum value in seconds you want. I normally set it to 5 seconds.After configuring the file, the line should look something like this
Now that's it, you may want to run the command
systemctl daemon-reload
just to complement this.You can then try rebooting or shutting down to confirm the change worked.
Bonus
If you want to set the maximum timeout for the entire system, you do so in the
/etc/systemd/system.conf
file.Look for the line
DefaultTimeoutStopSec
and set it just as you did previously.