incubator-seata icon indicating copy to clipboard operation
incubator-seata copied to clipboard

druid连接池配置参数放开test-on-borrow

Open vincent50411 opened this issue 1 year ago • 2 comments

Why you need it?

私有云环境网络波动不可控,druid连接池异常连接别应用拿到后不做检查(空闲检测时间无法修改,且连接不可替换),导致异常连接一直存在,进而导致应用异常,必须手动重启seata服务。

How it could be?

建议将这4个字段作为配置参数放开,让应用放灵活配置。 ds.setTimeBetweenEvictionRunsMillis(120000); ds.setMinEvictableIdleTimeMillis(300000); ds.setTestWhileIdle(true); ds.setTestOnBorrow(false);

vincent50411 avatar Jun 05 '24 03:06 vincent50411

Hi i will add this feature in next release.

xingfudeshi avatar Jun 05 '24 07:06 xingfudeshi

ds.setTestWhileIdle(true);

druid空闲保活还需要设置keepAlive为true,否则无效

zrlw avatar Jun 11 '24 07:06 zrlw

@vincent50411 Hello, please take a look at this PR and see if it meets your needs?

xingfudeshi avatar Jan 23 '25 08:01 xingfudeshi