-
Notifications
You must be signed in to change notification settings - Fork 819
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
Connection timeout is not honoured (using SSL connection) #3085
Comments
I'm guessing you need to use sslResponseTimeout which is in milliseconds. This PR #2687 seems relevant. |
I think connect timeout should apply to both ssl and simple connects |
in which case sslResponseTimeout seems redundant |
Ok, so the whole SSL timeout thing seems complicated. Do we remember why we added |
Using the sslResponseTimeout property works around the issue indeed 👍. But as vlsi said, maybe connectTimeout should be honoured, even in this case (SSL). |
I'm going to close this as there is a work around |
Describe the issue
The connection timeout configuration (connectTimeout property) is not honoured when connecting to a pgsql database (at least through SSL).
So if the connection is slow (more than 3s to establish) it will timeout even if more than 3s is configured in the configuration property.
The SSL mode is "require" and a client certificate + client private key are used.
Driver Version?
Since 42.5.2.
It is working fine with 42.5.1.
Still present in 42.7.1.
Java Version?
Not relevant.
OS Version?
Not relevant.
PostgreSQL Version?
14.7 (Ubuntu 14.7-1.pgdg22.04+1)
Case sensitivity: plain=lower, delimited=exact
SSL: yes
To Reproduce
In my case I'm using a database connection protected by Cloudflare Access which asks for a confirmation through the web browser before establishing the connection. That is during this time that the timeout occurs if I take more than 3 seconds to confirm the connection in Cloudflare Access.
connectTimeout
property of the JDBC connection.Expected behaviour
Depending on the connection speed:
The text was updated successfully, but these errors were encountered: