Redis with Resque and Rails: ERR command not allowed when used memory > 'maxmemory'

前端 未结 2 1037
灰色年华
灰色年华 2021-02-04 00:47

When using redis, it gives me the error:

ERR command not allowed when used memory > \'maxmemory\'

The info command reveals:

         


        
2条回答
  •  日久生厌
    2021-02-04 01:24

    Great answer by Didier, these are just the steps to increase it:

    redis-cli
    127.0.0.1:6379> config get maxmemory
    1) "maxmemory"
    2) "67108864" # (67mb) this will be different in your case
    

    This is how to change it:

    127.0.0.1:6379> config set maxmemory 100mb
    OK
    127.0.0.1:6379> config set maxmemory-policy allkeys-lru
    OK
    127.0.0.1:6379> config get maxmemory
    1) "maxmemory"
    2) "104857600"
    

提交回复
热议问题