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> 


目录
相关文章
|
15天前
|
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.
457 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
|
3月前
|
测试技术
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
125 0
|
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.
112 0
|
11月前
【WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, st】
【WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, st】
142 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.
410 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
503 0
运行 mongo 出现 Error: couldn‘t connect to server 127.0.0.1:27017, connection attempt failed