500 Internal Server Error - Redis problems

Hi, all of a sudden our instance has started to throw 500 Internal Server Error messages.

journalctl -u mastodon-web shows multiple occurrences of this error:

Redis::CommandError (MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.

redis-server.log shows a lot of trouble.

After one

  • DB saved on disk
  • RDB: 1 MB of memory used by copy-on-write
  • Background saving terminated with success

follow many

10000 changes in 60 seconds. Saving…
Can’t save in background: fork: Cannot allocate memory

followed by many

  • 10 changes in 300 seconds. Saving…
    Can’t save in background: fork: Cannot allocate memory

Until eventually a new “DB saved on disk” appeared.

Not knowing what to do, I restarted Mastodon. No more complaints from Redis, no more 500 errors.

Does this problem sound familiar to someone? How to prevent it?

Were you able to check the memory usage on the machine running Redis (with top or some monitoring)? I am afraid Redis for some reason could not get more memory, but it is hard to tell why.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.