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的更多相关文章

  1. 【错误】: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 ...

  2. 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 ...

  3. Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connectio

    严重: StandardWrapper.Throwableorg.springframework.transaction.CannotCreateTransactionException: Could ...

  4. 报错: 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 ...

  5. Could not open JDBC Connection for transaction

    Could not open JDBC Connection for transaction; nested exception is java.sql.SQLTransientConnectionE ...

  6. 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 ...

  7. 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 ...

  8. 解决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 ...

  9. 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, ...

随机推荐

  1. bat搜集

    1. 删除文件夹下指定名称的所有子文件夹 @echo off ::设置要保留的文件夹名,多个文件夹之间用英文逗号隔开,如果包含空格或英文逗号,英文&以及其它一些特殊字符的名字,请把该完整名字用 ...

  2. surface shader获取像素深度差值

    void vert (inout appdata_full v, out Input i) { UNITY_INITIALIZE_OUTPUT(Input, i); i.proj = ComputeS ...

  3. SAP PA Document List

    RE-Real Estate 房地产 RE010-EN-Col95-Real Estate Processes in SAP ERP RE200-EN-Col95-Real Estate Manage ...

  4. Apple Watch S3 解锁 MacBook Pro 2015版失败的解决办法

    我的MacBook Pro MF839由于只有128G的内存,所以就只能藏在我的抽屉底下,偶尔想体验一下xcode的时候再拿回来用下,想想都浪费 也不是不想换SSD,只是看了一下,价格太贵了,256G ...

  5. 4 playlook-Jinja2 filter

    jinja2模板,不多解释,请看例子 [root@LeoDevops jinjatwo]# cat j1.yaml - hosts: u12 gather_facts: False vars: lis ...

  6. 解决 nginx 出现 413 Request Entity Too Large 的问题

    1.若nginx用所用的 php 请求解析服务是 fpm, 则检查 /etc/php5/fpm/php.ini 文件中的参数 upload_max_filesize = 20M post_max_si ...

  7. lamda表达式和stream

    stream主要用于处理数据,看一下jdk的文档,并且主要处理集合对象: int sum = widgets.stream() .filter(w -> w.getColor() == RED) ...

  8. java爬取网站信息和url实例

    https://blog.csdn.net/weixin_38409425/article/details/78616688(出自此為博主) 具體代碼如下: import java.io.Buffer ...

  9. vim 命令补充(1)

    本篇文章主要教你如何使用 Vim 分屏功能. 分屏启动Vim 使用大写的O参数来垂直分屏. vim -On file1 file2 ... 使用小写的o参数来水平分屏. vim -on file1 f ...

  10. myBatis框架_关于怎么获得多表查询的总记录数

    <!-- 查找总记录数 --> <select id="billCount" resultType="int"> select coun ...