You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
redis create too many fd on one of node in cluster #2098
I use redis 3.0 RC1 which run on CentOS, there are 6 nodes in my cluster(node1...node6), in initial, there are 20 fds on all nodes, when I run my program (use JedisCluster), there are 71 fds on all nodes,which is right, for there are 51 redis clients in my program, then when run the program several hours later, the fds on one of my nodes is 10127 (other nodes still 71)which will cause my program get the error (CLUSTERDOWN), and I know this is caused by connection(connection reset by peer), then I try to increase the client count with the command:
config set maxclients 15000
about 20 seconds later, the count of fd on this node is 15131, my program still can't connect to redis. If I still increase the maxclients, then after several minutes later, more fds created.
and i found that when if the node have lots of fds, then the aof file is more more bigger than others, the normal node's aof file is about 6G, but collapse nodes's aof file is about 20G
when I restart the node and run BGREWRITEAOF command, receive (error) ERR, and this command will increate 6 fds
Keep using your first command to check the purpose of all the fds:
ll /proc/[PID]/fd/
You can even try this to see all your redis connections:
sudo netstat -nape |grep redis-
Notice how all the additional fds are just socket connections used by your clients.
Any problem with resources running out or files growing too big is because your Redis clients are connecting too much (without closing their connections) and/or writing a lot of data.
Hi, I run the command sudo sysctl vm.overcommit_memory=1 to solve the problem, but there are still questions, when fail to run command bgrewriteaof, why the redis increate 6 fds?
when trigger to rewrite aof, but failed, then it will continue to trigger to rewrite the aof, then lots of fds created.
Activity
[-]redis create many many fd in one of node in cluster[/-][+]redis create too many fd on one of node in cluster[/+]jomolangma commentedon Oct 24, 2014
and i found that when if the node have lots of fds, then the aof file is more more bigger than others, the normal node's aof file is about 6G, but collapse nodes's aof file is about 20G
when I restart the node and run BGREWRITEAOF command, receive (error) ERR, and this command will increate 6 fds
[user01@i-18-210-VM ~]$ sudo ls /proc/12609/fd | wc -l
116
[user01@i-18-210-VM ~]$ cd /data/redis/
[user01@i-18-210-VM redis]$ ./redis-cli -c
127.0.0.1:6379> bgrewriteaof
(error) ERR
127.0.0.1:6379> exit
[user01@i-18-210-VM redis]$ sudo ls /proc/12609/fd | wc -l
122
mattsta commentedon Oct 24, 2014
Keep using your first command to check the purpose of all the fds:
You can even try this to see all your redis connections:
Notice how all the additional fds are just socket connections used by your clients.
Any problem with resources running out or files growing too big is because your Redis clients are connecting too much (without closing their connections) and/or writing a lot of data.
jomolangma commentedon Oct 24, 2014
Hi, I run the command sudo sysctl vm.overcommit_memory=1 to solve the problem, but there are still questions, when fail to run command bgrewriteaof, why the redis increate 6 fds?
when trigger to rewrite aof, but failed, then it will continue to trigger to rewrite the aof, then lots of fds created.
Update RedisTimeSeries to version 8.11.90 (#15969)