错误日志1:
We are already in the process of making 21 connections and the number of simultaneous builds has been throttled to 20
在系统中查看数据库的连接数,已经设置的够大,怎么还出现这样的错误,最后发现数据库的连接数有好几个
<proxool.minimumConnectionCount>5</proxool.minimumConnectionCount>//最小连接数
<proxool.maximumConnectionCount>150</proxool.maximumConnectionCount>//最大连接数
<proxool.simultaneousBuildThrottle>20</proxool.simultaneousBuildThrottle>//同时最大连接数
We are already in the process of making 21 connections and the number of simultaneous builds has been throttled to 20
在系统中查看数据库的连接数,已经设置的够大,怎么还出现这样的错误,最后发现数据库的连接数有好几个
<proxool.minimumConnectionCount>5</proxool.minimumConnectionCount>//最小连接数
<proxool.maximumConnectionCount>150</proxool.maximumConnectionCount>//最大连接数
<proxool.simultaneousBuildThrottle>20</proxool.simultaneousBuildThrottle>//同时最大连接数
连接数够用,但是同时最大连接数设置的小了点,取不到连接导致报错。
错误日志2:
Could not toggle autocommit java.sql.SQLException: Couldn’t perform the operation setAutoCommit: You can’t perform any operations on this connection. It has been automatically closed by Proxool for some reason (see logs).
大体意思是由于某些原因,连接被proxool自动关闭。
后来发现是因为:<proxool.maximumActiveTime>300000</proxool.maximumActiveTime>的值设的太小,其默认值为5分钟,在运行中系统的值为3600ms。调整到300s就解决了问题。