系统运行一段时间后发现出现这样的异常:
couldn't get connection because we are at maximum connection count (150/150) and there are none available
解决方案:
1、修改连接池的最大的连接数:
2、更改hibernate.connection.release_mode配置的模式为:after_transaction
hibernate 的连接释放模式:hibernate.connection.release_mode 有三个选择:after_statement/after_transaction/on_close,默认的是on_close所以,这里要改成after_transaction