关键命令:
info clients #查看当前连接数
CONFIG GET maxclients #查看系统最大的连接数
CONFIG SET maxclients 20000 # 设置系统最大连接数为20000
config get timeout #查看超时连接 0表示不开启空闲清除
config set timeout 600 #设置空闲清理时间 ,修改redis.conf中的timeout属性也行
注意点:如果是redis 集群,每一个节点都需要改
关键命令:
info clients #查看当前连接数
CONFIG GET maxclients #查看系统最大的连接数
CONFIG SET maxclients 20000 # 设置系统最大连接数为20000
config get timeout #查看超时连接 0表示不开启空闲清除
config set timeout 600 #设置空闲清理时间 ,修改redis.conf中的timeout属性也行
注意点:如果是redis 集群,每一个节点都需要改