-
Notifications
You must be signed in to change notification settings - Fork 346
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
30s+ Hang When Using Manual Token Authentication #2224
Comments
This looks like a user-facing issue due to GoogleCloudPlatform/cloud-sql-go-connector#771. |
If I understand that linked issue correctly, it's a caching issue? Does that still explain the 30s hang happening every time a postgres client connects to the proxy? Even subsequent connects of the same client as the same user to the same running cloud-sql-proxy instance hangs for another 30s. |
Yes, it has to do with how the internal rate limiter works -- or in this case, not working. |
We're seeing this in a separate place too now. I'll get this fixed. |
This is definitely caused by GoogleCloudPlatform/cloud-sql-go-connector#771. Closing it as a duplicate. I have a fix that I'll put up today. |
Since we'll need to upgrade cloudsqlconn here, let's use #2224 as the tracking issue. |
Confirmed ref: #2212 (comment) |
Bug Description
When using token auth with IAM (e.g.
--auto-iam-authn --token --login-token
), the proxy takes an unreasonably long time to do the IAM postgres authentication. This can be seen in the logs attached when using--run-connection-test
.This long delay also happens each time a postgres client tries to access the db thru the proxy - including subsequent accesses.
E.g.
psql ...
takes 30s+ to get into thepostgres>
replThe same behavior is not observed when authenticating via Application Default Credentials.
Example code (or command)
No response
Stacktrace
No response
Steps to reproduce?
gcloud auth login
Environment
./cloud-sql-proxy --version
):2.10.1
./cloud-sql-proxy --port 5432 INSTANCE_CONNECTION_NAME
):Additional Details
Debug Logs:
Using ADC:
Notice the connection test passes immediately
Using Manual Access Tokens
Notice the connection test takes 30s to pass
The text was updated successfully, but these errors were encountered: