redis客户端连接过多不释放
查看redis客户端连接
|
1
2
3
4
5
6
|
redis-cli info clients# Clientsconnected_clients:6000client_longest_output_list:0client_biggest_input_buf:5792blocked_clients:0 |
查看redis 客户端状态
|
1
2
3
|
redis-cli client listaddr=127.0.0.1:52555 fd=5 name= age=855 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=clientaddr=127.0.0.1:52787 fd=6 name= age=6 idle=5 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping |
age:表示连接存在的时间,单位秒
idle:表示连接空闲时间,单位秒
查看redis客户端超时设置
|
1
2
3
|
redis-cli config get timeout1) "timeout"2) "0" #0表示不开启空闲清除 |
设置空闲清理时间
|
1
|
redis-cli config set timeout 600 |
posted on 2020-12-07 15:57 ExplorerMan 阅读(548) 评论(0) 收藏 举报
浙公网安备 33010602011771号