'Connection Time Out Error Postgres , Spring Boot
I'm getting the error:
java.sql.SQLTransientConnectionException: HikariPool-3 - Connection is not available, request timed out after 600000ms.
I'm using this property to connect like this
HikariDataSource hdataSource = new HikariDataSource();
hdataSource.setDataSourceClassName(driverClassName);
hdataSource.addDataSourceProperty("url", conURL);
hdataSource.addDataSourceProperty("user", dbUsr);
hdataSource.addDataSourceProperty("password", dbPwd);
hdataSource.setMaxLifetime(580000);
hdataSource.setMinimumIdle(20);
hdataSource.setValidationTimeout(3000);
hdataSource.setIdleTimeout(60000);
hdataSource.setConnectionTimeout(60000);
It's working, but I use the same connection to get more than 5 times data from DB these times of error occurred.
Any idea where I'm going wrong?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
