spring-data-redis:意外的流异常结束

时间:2017-01-19 16:22:56

标签: spring-data spring-data-redis

获得随机“意外结束流”异常。服务器上的负载(AWS Elasticache)很少。当时客户端有突发性负载,但并不总是发生异常。

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_73]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_73]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]
Caused by: org.springframework.data.redis.RedisConnectionFailureException: Unexpected end of stream.; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:47) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:36) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:210) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.connection.jedis.JedisConnection.exists(JedisConnection.java:781) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_73]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_73]
at org.springframework.data.redis.core.CloseSuppressingInvocationHandler.invoke(CloseSuppressingInvocationHandler.java:57) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at com.sun.proxy.$Proxy126.exists(Unknown Source) ~[na:na]
at org.springframework.data.redis.cache.RedisCache$AbstractRedisCacheCallback.waitForLock(RedisCache.java:460) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.cache.RedisCache$AbstractRedisCacheCallback.doInRedis(RedisCache.java:423) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:191) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:153) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:141) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.cache.RedisCache.get(RedisCache.java:105) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]
at org.springframework.data.redis.cache.RedisCache.get(RedisCache.java:90) ~[spring-data-redis-1.6.2.RELEASE.jar!/:1.6.2.RELEASE]

这是我可以通过更改客户端池配置来修复的吗?当我在客户端池中的工作者太少时,我通常会得到另一种异常,而不是“流结束”异常。

0 个答案:

没有答案