CodisLabs / codis

Proxy based Redis cluster solution supporting pipeline and scaling dynamically
MIT License
13.16k stars 2.69k forks source link

使用Codis集群的时候客户端报Broken pipe (Write failed) #1564

Open lsstarBear opened 6 years ago

lsstarBear commented 6 years ago

nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe (Write failed) custom format: Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe (Write failed) at redis.clients.jedis.Protocol.sendCommand(Protocol.java:104) ~[jedis-2.9.0.jar:?] at redis.clients.jedis.Protocol.sendCommand(Protocol.java:84) ~[jedis-2.9.0.jar:?] at redis.clients.jedis.Connection.sendCommand(Connection.java:127) ~[jedis-2.9.0.jar:?] at redis.clients.jedis.BinaryClient.llen(BinaryClient.java:306) ~[jedis-2.9.0.ja

lsstarBear commented 6 years ago

用的是jedis 参数配置 redis.maxIdle=1000
redis.maxTotal=2000
redis.maxWaitMillis=5000 redis.minEvictableIdleTimeMillis=300000
redis.numTestsPerEvictionRun=1024
redis.timeBetweenEvictionRunsMillis=30000
redis.testOnBorrow=true
redis.testWhileIdle=true