Jedis OOM command not allowed when used memory > 'maxmemory'

Redis Java About 524 words

原因

Redis内存满了(配置的最大内存为3G

127.0.0.1:6379> info memory
# Memory
used_memory:3220899496
used_memory_human:3.00G
used_memory_rss:3304706048
used_memory_rss_human:3.08G
used_memory_peak:3221246176
used_memory_peak_human:3.00G
total_system_memory:33625522176
total_system_memory_human:31.32G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:3221225472
maxmemory_human:3.00G
maxmemory_policy:volatile-lru
mem_fragmentation_ratio:1.03
mem_allocator:jemalloc-4.0.3

解决方法

方法一

设置key删除策略

方法二

清除数据:FLUSHALL

注意:FLUSHDB不能清除。

Views: 4,314 · Posted: 2020-10-21

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh