Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication Failure thrown only after timeout for getConnection() #2275

Open
bharathraj-gupta opened this issue Dec 20, 2024 · 0 comments

Comments

@bharathraj-gupta
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant