redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
Redis The not from get could resource Pool
2023-09-11 14:21:54 时间
最近一段时间忙着做系统,又是大几千行,写得有点疲惫,就更新少了,还是应该坚持更新,好记性不如烂笔头。
今天遇到个小问题,
jedis从连接池取连接失败,导致这个的原因比较多,我说下我这边的问题。
上面乍一看,是没问题,在finallly中释放了连接,可实际上,获取连接的那一句并没有被try块包围起来,所以如果getJedis出现了异常,finally不会执行。
改成如下即可。
相关文章
- redis集群与分片(2)-Redis Cluster集群的搭建与实践
- redis实战笔记(10)-第10章 扩展Redis
- redis实战笔记(6)-第6章 使用 Redis构建应用程序组件
- redis实战笔记(5)-第5章 使用 Redis构建支持程序
- The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- 报错:The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.
- The platform of the target `Pods` (iOS 4.3) is not compatible 错误
- Redis开发与运维. 2.4 列表
- The last access date is not changed even after reading the file on Windows 7
- Redis——jedis连接redis哨兵模式简单使用
- Redis——maven、spring、jedis快速搭建redis工程
- redis
- The GuidRepresentation for the reader is CSharpLegacy, which requires the binary sub type to be Uuid
- 【Redis】启动3个告警解决:WARNING: The TCP backlog setting of 511
- 在创建JSP时提示The superclass"javax.servlet.http.HttpServlet"was notfound on the Java Build Path错误
- ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
- 编译The little book of redis 中文版
- Input and Output-The input is all the sources of action for your app
- ubuntu添加源报错The following signatures couldn't be verified because the public key is not available
- 【Spring常见错误】java.lang.NoClassDefFoundError: redis/clients/jedis/UnifiedJedis
- Redis 实现队列http://igeekbar.com/igeekbar/post/436.htm
- Unity 报错之 The type or namespace name ‘UI‘ does not exist in the namespace ‘UnityEngine‘
- Unity 报错之 The same field name is serialized multiple times in the class or its parent class.
- The incident LOST_EVENTS occured on the master. Message: error writing to the binary log, Error_code
- Installing Windows Identity Foundation on Windows 8 - The Certificate for the signer of the message is invalid or not found.
- 曹工说Redis源码(7)-- redis server 的周期执行任务,到底要做些啥