HikariCP
HikariCP copied to clipboard
Connection Timeout - Not able to connect to AWS Redshift HikariCP
@brettwooldridge,
Background: I am facing a very strange issue. I have a SpringBoot report generator app running as a Docker container and it connects to AWS Redshift to fetch the report data.
Here's what happening.
-
Trigger report generation (Right after spinning the docker container, very first request) - Everything works fine.
-
Subsequent report generation requests - the app tries to connect to the Redshift and hits HikariPool.getConnection() method and it starts logging
connection is dead
until we see theconnection timeout
error. Also, along with theconnection is dead
things it keeps on printing “adding” and “closing” connections in the log until it finally throws the connection timeout error.
I tried default Hikari config as well as different permutations and combinations of Hikari settings but it's the same - connectionTimeout error
right after whatever connectionTimeout setting I have in the Hikari config.
And, if I handle the error via try-catch block and retry to connect, then it is running fine. Also, If I set minimumIdle less than maxpoolSize (minimumIdle=2, maxpoolSize=20), it works. Although it hands out dead connections it works.
which version did you use?may be the latest have fixed that issue