0

I have a problem in redis, Each 18-30 hour it failed and I should restart it manually to run it again. Our server have 1 wordpress website. Redis version: 5.0.3 OS: CentOS Linux release 8.3.2011

regards

Check Erro Message From Here

  • 1
    I don't know redis, but that log message is claiming that something (either a user or another process) sent a KILL signal (9) to it. Processes are supposed to exit when they receive that signal, so you need to determine what sent it, and why. – Gus Jul 06 '22 at 16:54

1 Answers1

0

I would recommend you to first check /var/log/messages to get the full picture, maybe redis' log as well.

You can see the process was ended with SIGKILL, which usually implies that it was killed by the OOM killer. This happens when your kernel does not have enough memory to operate and needs to kill processes to continue. OOM killer's log messages can be found here

You have several options to mitigate this.

  1. Investigate long term memory usage on your system. This is by far the most important one.
  2. Set up or increase the size of your swapfile. OOM killer is invoked only if kernel has trouble allocating physical memory pages, this does not apply to swap space. This is more of a band aid (not a solution), but should help on systems with relatively low workloads, like servers with a single WP website.
  3. Add Restart=always to /usr/lib/systemd/system/redis.service and reload the configuration with systemctl daemon-reload. This will make sure your redis won't stay down but won't help with your memory issues
  4. Tweak the OOMScoreAdjust value in redis.service to make sure redis doesn't get killed. The downside is that kernel might choose something more important to kill (like sshd)
  5. Increase the amount of physical memory
GNUPepe
  • 56
  • 2