Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用ioredis。我没有使用,redis.disconnect()但最近我得到了一个:Ready check failed: ERR max number of clients reached错误。
redis.disconnect()
Ready check failed: ERR max number of clients reached
这和我不关门有关系吗?
使用 redisFree() 释放 redisConnect() 创建的连接套接字
连续打开连接而不关闭不是一个好习惯。这不仅会消耗您的资源,还可能导致程序崩溃。可以同时打开的最大文件描述符数是 1024。如果超过这个限制,Redis 会报错:can't create socket; 打开的文件太多。
希望这会有所帮助..