首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >spring-data-redis:流异常的意外结束

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

Stack Overflow用户
提问于 2017-01-19 16:22:55
回答 1查看 3.3K关注 0票数 1

随机的“流的意外结束”异常。服务器上的负载(AWS弹性缓存)是最小的。当时客户端有大量的负载,但例外情况并不总是发生。

代码语言:javascript
复制
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]

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

EN

回答 1

Stack Overflow用户

发布于 2022-11-02 14:48:34

如果您正在使用redis发布子机制,那么可能出现此错误的原因之一是由于redis配置中的数据输出缓冲区集的限制。

如果数据吞吐量大于配置中设置的限制,java redis连接将失败,因为它达到最大限制,因此您需要更改发布子通道的客户端最大输出缓冲区值的配置,然后解决此问题。

客户端-输出-缓冲区-限制发布

类似地,对于正常客户端的缓冲区限制和复制也有配置。当复制有某些限制时,普通客户端没有限制。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41746749

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档