Couldn't get connection because we are at maximum connection count (150/150) and there are none 异常解决

简介: <p>系统运行一段时间后发现出现这样的异常:</p> <p>Couldn't get connection because we are at maximum connection count (150/150) and there are none available</p> <p><br></p> <p>解决方案:</p> <p>1、修改连接池的最大的连接数:</p> <p>

系统运行一段时间后发现出现这样的异常:

Couldn't get connection because we are at maximum connection count (150/150) and there are none available


解决方案:

1、修改连接池的最大的连接数:

<maximum-connection-count>1000</maximum-connection-count>

2、 更改hibernate.connection.release_mode配置的模式为:after_transaction
Hibernate 的连接释放模式:hibernate.connection.release_mode 有三个选择:after_statement/after_transaction/on_close,默认的是on_close所以,这里要改成after_transaction

<prop key="hibernate.connection.release_mode">after_transaction</prop> 


目录
相关文章
|
数据库 数据安全/隐私保护 数据库管理
|
监控 druid
druid 连接池监控报错 Sorry, you are not permitted to view this page.
druid 连接池监控报错 Sorry, you are not permitted to view this page.
2898 0
|
SQL Windows
保姆级:Windows Server 2012上安装.NET Framework 3.5
保姆级:Windows Server 2012上安装.NET Framework 3.5
4398 0
|
机器学习/深度学习 网络协议 网络安全
人工智能 缓存 前端开发
11742 59
人工智能 JavaScript 开发工具
4725 17
Web App开发 人工智能 API
1238 1
开发工具 Swift git
1920 6