我得到一個連接異常(在最後給定的),即使我做了以下內容:Redis的連接關閉錯誤
在創建Jedis的一個實例,我設置了超時字段設置爲1個小時(60 * 60 * 1000 )。我也用0試過了,那也行不通。
當我在7分鐘後檢查日誌時,我注意到了它,儘管我認爲例外會在很早之前發生(在300秒)。爲什麼我一直在得到它?任何想法爲什麼?
Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: It seems like server has closed the connection.
at redis.clients.util.RedisInputStream.readLine(RedisInputStream.java:90)
at redis.clients.jedis.Protocol.processMultiBulkReply(Protocol.java:111)
at redis.clients.jedis.Protocol.process(Protocol.java:64)
at redis.clients.jedis.Protocol.read(Protocol.java:127)
at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:199)
at redis.clients.jedis.BinaryJedis.smembers(BinaryJedis.java:1187)
我遇到過這個問題。你可以幫我嗎?謝謝。 [http://stackoverflow.com/questions/34131736/redis-it-seems-like-server-has-closed-the-connection](http://stackoverflow.com/questions/34131736/redis-it-seems- like-server-has-closed-the-connection) – jonnyLee