Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.GetConnection
Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 3000, active 16, maxActive 16"
这个异常可能是因为druid连接池泄漏产生的异常。连接超时,active和maxActive相等,不能够创建新的连接,如果很长时间还获取不到,很有可能是连接池泄漏造成的,而且没有开启druid的超时回收导致的。
添加回收机制后,
#druid recycle
druid.removeAbandoned=true
druid.removeAbandonedTimeout=300
druid.logAbandoned=true
置removeAbandoned对性能会有一些影响,建议怀疑存在泄漏之后再打开。在上面的配置中,如果连接超过300秒未关闭,就会被强行回收,并且日志记录连接申请时的调用堆栈。
https://my.oschina.net/haogrgr/blog/224010
Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.GetConnection的更多相关文章
- 【错误】:Could not open JDBC Connection for transaction; nested exception is: Communications link failure;The last packet sent successfully to the server was 1 milliseconds ago
# #错误日志 2016-11-10 16:19:20,834 ERROR [org.quartz.core.JobRunShell] - Job DEFAULT.jobtask threw an u ...
- Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not create connection to database server.
报错信息:Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQL ...
- Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connectio
严重: StandardWrapper.Throwableorg.springframework.transaction.CannotCreateTransactionException: Could ...
- 报错: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. 数据库连接超时
解决方法一: [oracle@data ~]$ sqlplus / as sysdba——连接到数据库 SQL*Plus: Release 11.2.0.4.0 Production on Mon M ...
- Could not open JDBC Connection for transaction
Could not open JDBC Connection for transaction; nested exception is java.sql.SQLTransientConnectionE ...
- Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Cannot open connection
Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceE ...
- org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Cannot open con
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session f ...
- 解决Could not open Hibernate Session for transaction; nested exception is java.lang.NoClassDefFoundError: org/hibernate/engine/transaction/spi/TransactionContext
我使用的是5.2.8的hibernate的jar包,运行的时候却报错Could not open Hibernate Session for transaction; nested exception ...
- ERROR 14856 --- [reate-882003853] com.alibaba.druid.pool.DruidDataSource : create connection error, url: jdbc:mysql://localhost:3306/xhb?useUnicode=true&characterEncoding=UTF-8, errorCode 1045, sta
ERROR 14856 --- [reate-882003853] com.alibaba.druid.pool.DruidDataSource : create connection error, ...
随机推荐
- VBA二次学习笔记(2)——两个Excel表内容比较
说明(2018-9-3 22:38:58): 1. 就是之前问同事要来的作业,有两个格式一样的Excel文件,一个是正确答案,一个是员工作答的.通过代码将两个文件进行比对,把不同之处列出来. 正文: ...
- Java反射+简单工厂模式总结
除了 new 之外的创建对象的方法 通过 new 创建对象,会使得程序面向实现编程,先举个例子,某个果园里现在有两种水果,一种是苹果,一种是香蕉,有客户想采摘园子里的水果,要求用get()方法表示即可 ...
- List分组
IEnumerable<IGrouping<string, SysMap>> query = sysMapList.GroupBy(pet => pet.Mobile);
- MyBatis总结五:#{}和${}的用法和区别
From: https://www.cnblogs.com/blazeZzz/p/9295634.html #{}的用法: 我们发现,在Mapper.xml映射文件中,经常使用#{属性名} 来作为SQ ...
- Golang pprof详解
go的pprof包 go中有pprof包来做代码的性能监控,在两个地方有包: net/http/pprof runtime/pprof 其实net/http/pprof中只是使用runtime/ppr ...
- 六种常见排序算法的java实现
package edu.cn.ysw; //八种排序算法的实现与效率分析 /* * 内排序的种类: * 1.插入排序:直接插入排序.希尔排序. * 2.选择排序:简单选择排序.堆排序. 3.交换排序: ...
- linux 的基本操作(linux系统的日常管理)
系统的日常管理 笔者在前面介绍的内容都为linux系统基础类的,如果你现在把前面的内容全部很好的掌握了,那最好了.不过笔者要说的是,即使你完全掌握了,你现在还是不能作为一名合格的linux系统管理员的 ...
- Oracle数据库实例的启动及关闭
要启动和关闭数据库,必须要以具有Oracle 管理员权限的用户登陆,通常也就是以具有SYSDBA权限的用户登陆.一般我们常用SYS用户以SYSDBA连接来启动和关闭数据库.下面介绍Oracle数据库几 ...
- Tesseract
定义 Tesseract是一个将图像翻译成文字的OCR库(光学文字识别,Optical Character Recognition) 安装 sudo apt-get install tesseract ...
- Nginx打卡
Nginx打卡 此括号中的是干货 [ 直接说最关心的事:如何去掉访问路径的端口号? 答案:使用Nginx啊 具体安装还需看底下啰嗦的东东,安装OK且完美启动的同学,server proxy_pass ...