J
J
John--Smith2018-12-21 02:08:46
Redis
John--Smith, 2018-12-21 02:08:46

I allocated redis 300mb RAM and when the rest of the system requests memory, it sometimes gets into redis memory and crashes. What to do?

I have 4GB of RAM, of which I allocated 300MB for the radish, and I would like to isolate the radish so that other services do not squeeze it out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Syomov, 2018-12-22
@kotomyava

Redis error: OOM command not allowed when used memory > 'maxmemory'

What is happening to you is not what you probably think.
You just run out of redis allocated memory, i.e. you run into maxmemory 300000000.
You either need to figure out what is written there in such quantity (or why it is not deleted).
Or change the strategy for deleting data from it, for example, deleting not only expire, as by default, but everything that has not been used for a long time (maxmemory-policy allkeys-lru, !data will be lost!)
Or allocate more memory.
Or do not use it as a database, because. it's not needed for that... =)
Also, in certain cases, redis can use up to 2 times more memory than the data written to it, if there are a large number of write operations.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question