nested exception is io.lettuce.core.RedisCommandTimeoutException

Posted _瞳孔

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nested exception is io.lettuce.core.RedisCommandTimeoutException相关的知识,希望对你有一定的参考价值。

完整报错:org.springframework.dao.QueryTimeoutException: Redis command timed out; nested exception is io.lettuce.core.RedisCommandTimeoutException: Command timed out after 5 second(s)

我服务上线老是连接超时,之前以为是网不好,但发现超时时间设置为5秒也还是每次都超时,然后查阅资料后发现需要把连接池从lettuce改为jedis:

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.lettuce</groupId>
                    <artifactId>lettuce-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
        </dependency>

如果有兴趣了解更多相关内容,欢迎来我的个人网站看看:瞳孔的个人空间

以上是关于nested exception is io.lettuce.core.RedisCommandTimeoutException的主要内容,如果未能解决你的问题,请参考以下文章

nested exception is io.lettuce.core.RedisCommandTimeoutException

nested exception is io.lettuce.core.RedisCommandTimeoutException

nested exception is org.apache.ibatis.reflection.ReflectionExceptio

Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jacks

HTTP Status 500 - Request processing failed; nested exception is org.hibernate.exception.GenericJDBC

随手记录关于Factory method 'eurekaApplicationInfoManager' threw exception; nested exception is j(代