alcoma
Redis isn't stopping at 10MB, the logs tell you it's using that much memory to do the snapshot but then when it forks the system isn't giving it enough memory to do this. Redis itself could be using multiple GB of RAM to store the Cache in memory (It only write things to disk so it can load it back again if a system restart happens). Redis will continue to consume RAM as it needs unless you tell it how much it's allowed to use.
If you run the command top
on your server, you will see processes and how much memory they are using. This will give you an idea of what process is actually eating all your RAM. If it is Redis, then look at the redis configs, most likely in /etc/redis/redis.conf . There is a setting called maxmemory
and maxmemory-policy
set this to the amount you want to limit it to. We set this to 2GB on a 4GB System and policy to allkeys-lru
, but you can pick your own policy.
If you truely have 20GB of RAM, then I can't see why these services would be using it all. You might find that Redis is already memory limited but the policy is set to not delete any keys and to just throw an error instead.