We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
any
1.2.22+
none
import com.alibaba.druid.pool.DruidDataSource import groovy.sql.Sql class TestDruid { static void main(String[] args) { def dataSource = getDataSource() def sql = new Sql(dataSource) List datas = sql.rows("select 1000") sleep(3600000) } static DruidDataSource getDataSource() { DruidDataSource dataSource = new DruidDataSource() dataSource.setUrl("xxxxxx") dataSource.setUsername("xxxxxx") dataSource.setPassword("xxxxxx") dataSource.setDriverClassName("xxxxxx") dataSource.setInitialSize(10) dataSource.setMaxActive(50) dataSource.setMinIdle(10) dataSource.setMinEvictableIdleTimeMillis(7200000) dataSource.setValidationQuery("select 123") dataSource.setKeepAlive(true) return dataSource } }
会以默认周期2分钟的频率创建新连接:
No response
2833431#diff-607f3e6b95004336d0b44bf13934c27efcac5ba101094d89a9524095f351ee30L3404
1.2.22之前,此处fillCount为负数时,不会进入for循环,不会执行emptySignal()触发创建新连接。
The text was updated successfully, but these errors were encountered:
同样遇到类似问题,低负载时,连接不释放,跟代码发现一直在销毁和创建连接
Sorry, something went wrong.
升级到1.2.22,空载时连接数降不下去,回退到1.2.20就没问题了。发现1.2.22版本一直在新建连接,这个有什么临时规避方法么?
考虑下不要配置minIdle,默认0,就不会触发这个问题。 或者minEvictableIdleTimeMillis配置改小,加速释放空闲连接。
No branches or pull requests
Database Type
any
Database Version
any
Druid Version
1.2.22+
JDK Version
any
Error SQL
none
Testcase Code
会以默认周期2分钟的频率创建新连接:
Stacktrace Info
No response
Error Info
2833431#diff-607f3e6b95004336d0b44bf13934c27efcac5ba101094d89a9524095f351ee30L3404
1.2.22之前,此处fillCount为负数时,不会进入for循环,不会执行emptySignal()触发创建新连接。
The text was updated successfully, but these errors were encountered: