Tag:connect again

  • Handling method of redis connection timeout exception

    Time:2020-10-18

    0. Problem description Using jedis to connect to redis for data query operation, the normal code operation is OK, but the following errors will be reported from time to time: Exception in thread “main” redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out  at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:202)  at redis.clients.util.RedisInputStream.read(RedisInputStream.java:181)  at redis.clients.jedis.Protocol.processBulkReply(Protocol.java:181)  at redis.clients.jedis.Protocol.process(Protocol.java:155)  at redis.clients.jedis.Protocol.processMultiBulkReply(Protocol.java:206)  at redis.clients.jedis.Protocol.process(Protocol.java:157)  at redis.clients.jedis.Protocol.processMultiBulkReply(Protocol.java:206)  at redis.clients.jedis.Protocol.process(Protocol.java:157) […]