Av oid to use blocking commands in Async/JavaRx/Reactive handlers.

凌晨吹风 发布于 05/07 15:30
阅读 138
收藏 0

开源之夏第三届火热来袭,高校学生参与赢万元奖金!>>>

我在代码使用到这种调用方式

String o = redisTemplate.opsForValue().get(key);

当我进行压力测试的时候发现偶尔会出现一下的报错

Caused by: org.redisson.client.RedisTimeoutException: Command still hasn't been written into connection! Avoid to use blocking commands in Async/JavaRx/Reactive handlers. Try to increa
se nettyThreads setting. Payload size in bytes: 0. Node source: NodeSource [slot=0, addr=null, redisClient=null, redirect=null, entry=null], connection: RedisConnection@1404436945 [red
isClient=[addr=redis://127.0.0.1:6379], channel=[id: 0xfc31828f, L:/127.0.0.1:46140 - R:/127.0.0.1:6379], currentCommand=null], command: (GET), params: [[83, 83, 79, 58, 85, 83, 58, 98
, 101, 53, ...]] after 3 retry attempts
        at org.redisson.command.RedisExecutor$2.run(RedisExecutor.java:205)
        at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715)
        at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34)
        at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703)
        at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790)
        at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

哪位大哥有遇到类似的问题呢?如何解呢?

加载中
0
w
walk_lai

錯誤信息不是說了嗎,不要在異步操作中使用阻塞命令。嘗試加大 nettyThreads  

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部
返回顶部
顶部