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> 


目录
相关文章
|
22天前
|
SQL 关系型数据库 MySQL
SQL Error (2013): Lost connection to MySQL server at 'waiting for initial communication packet', sys...
SQL Error (2013): Lost connection to MySQL server at 'waiting for initial communication packet', sys...
|
6月前
|
Web App开发 前端开发
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
464 0
|
5月前
|
NoSQL Redis
Lettuce: Connection to x.x.x.x not allowed. This connection point is not known in the cluster view
Lettuce: Connection to x.x.x.x not allowed. This connection point is not known in the cluster view
|
10月前
|
数据库
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
113 0
|
10月前
|
关系型数据库 MySQL 数据库连接
一文全解决 数据库连接报错Communications link failure,create connection SQLException
一文全解决 数据库连接报错Communications link failure,create connection SQLException
2079 0
|
Linux
七个办法只有一个有效:200 PORT command successful. Consider using PASV.425 Failed to establish connection.
七个办法只有一个有效:200 PORT command successful. Consider using PASV.425 Failed to establish connection.
416 0
七个办法只有一个有效:200 PORT command successful. Consider using PASV.425 Failed to establish connection.
|
NoSQL MongoDB
运行 mongo 出现 Error: couldn‘t connect to server 127.0.0.1:27017, connection attempt failed
运行 mongo 出现 Error: couldn‘t connect to server 127.0.0.1:27017, connection attempt failed
514 0
运行 mongo 出现 Error: couldn‘t connect to server 127.0.0.1:27017, connection attempt failed
|
关系型数据库 MySQL Java
JDBC 连接 MySQL 报错 Unknown system variable ‘query_cache_size‘
JDBC 连接 MySQL 报错 Unknown system variable ‘query_cache_size‘
1635 0
JDBC 连接 MySQL 报错 Unknown system variable ‘query_cache_size‘