报错: com.alibaba.druid.pool.DruidDataSource : abandon connection, owner thread

简介: 报错: com.alibaba.druid.pool.DruidDataSource : abandon connection, owner thread

出现这个错误,不慌。

 

这是druid强制关闭连接,打印出来的。


那么为什么会强制关闭连接, 因为这2个参数:


image.png

如果你出现这个错误,影响到了你的业务,数据,那么你可以考虑把这个超时时间适当延长;


如果你出现这个错误,没有影响到你的业务,那么你大可不必管它,因为这个回收也是为了避免你不小心忘记关闭的连接泄露了。


当然也有直接不设置true的,就是不会出现自动强制回收,这个具体得看情况而定了,我建议还是设置好些。

相关文章
|
5月前
|
架构师 Java 数据库连接
成功解决:com.alibaba.druid.support.logging.JakartaCommonsLoggingImpl.
这篇文章提供了解决Spring整合MyBatis时报错的配置方法,包括使用Spring的上下文属性占位符加载数据库配置文件`db.properties`,并在Spring配置文件中声明并配置数据源`DruidDataSource`。
|
8月前
|
Java 数据库连接 mybatis
解决Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: No constructor found
解决Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: No constructor found
363 1
|
7月前
【ERROR】No qualifying bean of type ‘com.alibaba.druid.pool.DruidDataSource‘ available
【ERROR】No qualifying bean of type ‘com.alibaba.druid.pool.DruidDataSource‘ available
88 0
|
druid Java
Failed to bind properties under 'spring.datasource' to javax.sql.DataSource:
Failed to bind properties under 'spring.datasource' to javax.sql.DataSource:
834 0
Failed to bind properties under 'spring.datasource' to javax.sql.DataSource:
|
8月前
|
NoSQL Java Redis
【问题篇】解决Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException
【问题篇】解决Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException
2582 0
|
关系型数据库 MySQL
ERROR com.alibaba.druid.pool.DruidDataSource - create connection SQLException, url
ERROR com.alibaba.druid.pool.DruidDataSource - create connection SQLException, url
3211 0
ERROR com.alibaba.druid.pool.DruidDataSource - create connection SQLException, url
|
druid
java.lang.IllegalStateException: Error processing condition on com.alibaba.druid.spring.boot.autocon
java.lang.IllegalStateException: Error processing condition on com.alibaba.druid.spring.boot.autocon
412 0
|
SQL 关系型数据库 MySQL
org.springframework.jdbc.BadSqlGrammarException: Error updating database
org.springframework.jdbc.BadSqlGrammarException: Error updating database
272 0
|
Java 关系型数据库 MySQL
HikariPool-1 - Exception during pool initialization. Springboot 默认选择的mysql
HikariPool-1 - Exception during pool initialization. Springboot 默认选择的mysql
1579 1
|
关系型数据库 MySQL Java
Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionExcep linux下mysql修改连接超时wait_timeout修改后就ok了
Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionExcep linux下mysql修改连接超时wait_timeout修改后就ok了
197 1