0

我们在生产平台上运行 redis。Redis 在它上面运行良好,但时不时地开始建立内存,然后最终会崩溃。

我们似乎无法确定正在发生的事情。这种情况每周发生一次。在本周剩下的时间里,它以最大 400mb 的内存运行。

这是所有 redis-cli 信息:

# Server
redis_version:2.8.4
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:645b61b5aa39f6b1
redis_mode:standalone
os:Linux 3.13.0-170-generic x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.8.4
process_id:14311
run_id:ec45c8262378b81c977cd8ef1f1466872601a72b
tcp_port:6379
uptime_in_seconds:174217
uptime_in_days:2
hz:10
lru_clock:680264
config_file:/etc/redis/redis.conf

# Clients
connected_clients:4
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:4516218008
used_memory_human:4.21G
used_memory_rss:4007305216
used_memory_peak:4522107864
used_memory_peak_human:4.21G
used_memory_lua:33792
mem_fragmentation_ratio:0.89
mem_allocator:jemalloc-3.5.1

# Persistence
loading:0
rdb_changes_since_last_save:3095
rdb_bgsave_in_progress:0
rdb_last_save_time:1558694950
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:9
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok

# Replication
role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:1122.99
used_cpu_user:422.74
used_cpu_sys_children:20.35
used_cpu_user_children:162.11

# Commandstats
cmdstat_get:calls=11786294,usec=83965773,usec_per_call=7.12
cmdstat_set:calls=100000,usec=257525,usec_per_call=2.58
cmdstat_setex:calls=1462233,usec=90698334,usec_per_call=62.03
cmdstat_del:calls=16950,usec=105826,usec_per_call=6.24
cmdstat_lpush:calls=100000,usec=241470,usec_per_call=2.41
cmdstat_select:calls=1412415,usec=5822129,usec_per_call=4.12
cmdstat_keys:calls=1,usec=7307,usec_per_call=7307.00
cmdstat_dbsize:calls=2,usec=7,usec_per_call=3.50
cmdstat_info:calls=152,usec=18292,usec_per_call=120.34
cmdstat_monitor:calls=5,usec=18,usec_per_call=3.60
cmdstat_ttl:calls=3,usec=25,usec_per_call=8.33
cmdstat_config:calls=3,usec=69,usec_per_call=23.00
cmdstat_slowlog:calls=1,usec=7,usec_per_call=7.00

# Keyspace
db0:keys=24429,expires=24425,avg_ttl=37811496

我们已经阅读了解决方案,但不想实施,因为我们对首先尝试什么持观望态度。当我们在发生这种情况时清除 redis db 时,它会再次开始构建。

4

0 回答 0