Open yourchanges opened 4 years ago
maybe related to #1420
we use AbstractRoutingDataSource to manage 4 datasource, here is the ds build code:
String driverClassName = properties.getDriverClassName();
String url = properties.getUrl();
String username = properties.getUsername();
String password = properties.getPassword();
DataSourceBuilder factory = DataSourceBuilder.create().driverClassName(driverClassName).url(url)
.username(username).password(password).type(dataSourceType);
DataSource ds = factory.build();
if (ds instanceof HikariDataSource) {
HikariDataSource hikariDataSource = (HikariDataSource) ds;
hikariDataSource.setMaximumPoolSize(properties.getMaxPoolSize() == null
? 100 : properties.getMaxPoolSize());
hikariDataSource.setMaxLifetime(properties.getMaxLeftTime() == null
? 30000 : properties.getMaxLeftTime());
}
return ds;
ENV:
our app process takes 10GB memory, and there are many instances related to hikari:
Is there a connection leak? What should I do in next step?
JMAP full output: