I'm running redis-server on Ubuntu 16.04. After a recent upgrade to redis 3.2.7 I now see lines like
signal-handler (1486427812) Received SIGTERM scheduling shutdown...
every minute or two in the redis log and then redis restarts.
The only other suspicious line in the logs is:
# WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
Any advice on how to diagnose why this is happening would be greatly appreciated. Thanks!
For anyone else still looking for a solution, Type=forking
(which is default for redis installed with apt
) is incompatible with supervised=systemd
in redis.conf
.
It has to be updated to Type=simple
in /etc/systemd/system/redis.service
.
Forking is only required in daemonized mode, but systemd managed redis overrules the daemonized setting.
Change from Restart=always
to Restart=on-failure
For reference- redis.conf, https://www.freedesktop.org/software/systemd/man/systemd.service.html
Just for the record: As in J G Miller's comment, you have to watch that "Type=simple" and "daemonize yes" settings are incompatible. I struggeld a few days while I found this comment. My redis just simply gave the start-limit-hit error because when the service started it immediately got the SIGTERM signal and stopped.
So either change in the service file the "Type=forking" or the "daemonize no" lines to solve this, depending on your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With