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

fix: use lazy refresh for Cloud SQL Connector #55

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

jackwotherspoon
Copy link
Contributor

The Cloud SQL Python Connector just released a new version v1.10.0
that supports setting the refresh_strategy argument of the connector.

Setting the refresh strategy to lazy refresh is recommended for
serverless environments. As the default refresh strategy is to
have background refreshes occur to get the instance metadata and a fresh
certificate to use for the SSL/TLS connection.

However, these background refreshes can be throttled when serverless
environments scale to zero (Cloud Functions, Cloud Run etc.).

This PR will fix the ambiguous errors that are a result of the CPU being
throttled for the Cloud SQL Connector.

@jackwotherspoon jackwotherspoon self-assigned this Jun 26, 2024
@jackwotherspoon jackwotherspoon requested review from a team as code owners June 26, 2024 20:12
@product-auto-label product-auto-label bot added the api: cloudsql-sqlserver Issues related to the googleapis/langchain-google-cloud-sql-mssql-python API. label Jun 26, 2024
@averikitsch averikitsch merged commit 0c29445 into main Jun 26, 2024
13 checks passed
@averikitsch averikitsch deleted the lazy-refresh-connector branch June 26, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudsql-sqlserver Issues related to the googleapis/langchain-google-cloud-sql-mssql-python API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants