Description
Hi,
I am using Hikari connection pool with the below config.
hikari.cp.conf.autoCommit=true
hikari.cp.conf.connectionTimeout=10000
hikari.cp.conf.idleTimeout=10000
hikari.cp.conf.maxLifetime=300000
hikari.cp.conf.minimumIdle=0
hikari.cp.conf.maximumPoolSize=15
When the getConnection() is triggered the request is failing only after 10 seconds which is my connection timeout even though its because of Authentication failure. It is only know when I look into the stack trace of the exception that it failed due to authentication failure.
The exception message looks like this which is very misleading:
"Connection is not available, request timed out after 10000ms (total=0, active=0, idle=0, waiting=0)"
Deep inside stacktrace I see this message:
"Caused by: com.sap.db.jdbc.exceptions.SQLInvalidAuthorizationSpecExceptionSapDB: [10]: authentication failed"
I also tried to use "initializationFailTimeout=0". But this is not helping as this is only useful when initialising the pool. It doesnt work in subsequent requests.
I would like to know if there is any parameter which can help in fail fast during such authentication failure instead of waiting for 10 seconds ? Or what are the alternatives ?
Any help is highly appreciated!
Thanks in advance.
Best Regards,
Bharath Raj Gupta