多線程高並發去連接redis出現連接超時情況之一


redis大量發起鏈接時,會報出連接超時的錯誤,但是redis並沒有宕機,這是因為配置文件用的jedis

 

 

 

如果是lettuce模式連接,可能不會報這個錯;

修改如下,把lettuce這個包去掉后就不會報錯了


<!-- redis工具類 -->
<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>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM