We have been running a service using NestJS and TypeORM on fully managed CloudRun without issues for several months. Yesterday PM we started getting Improper path /cloudsql/{SQL_CONNECTION_NAME} to connect to Postgres Cloud SQL instance "{SQL_CONNECTION_NAME}"
errors in our logs.
We didn't make any server/SQL changes around this timestamp. Currently there is no impact to the service so we are not sure if this is a serious issue.
This error is not from our code, and our third party modules shouldn't know if we use Cloud SQL, so I have no idea where this errors come from.
My assumption is Cloud SQL Proxy or any SQL client used in Cloud Run is making this error. We use --add-cloudsql-instances flag when deploying with "gcloud run deploy" CLI command.
Link to the issue here
Steps to run an sql file on my Google Cloud Sql instance using the gcloud sql console are as follows: Create a GCP storage bucket (ideally in the same project) Upload the file to this bucket. Import the sql file from this bucket in the overview section of the GCP SQL console.
For public IP paths, Cloud Run provides encryption and connects using the Cloud SQL Auth proxy through Unix sockets. For private IP paths, your application will connect directly to your instance through Serverless VPC Access. This method uses TCP to connect directly to the Cloud SQL instance without using the Cloud SQL Auth proxy.
After you configure Cloud Run, you can connect to your Cloud SQL instance. Cloud Run does not support connecting to Cloud SQL for SQL Server over public IP. Use private IP instead. For public IP paths, Cloud Run provides encryption and connects using the Cloud SQL Auth proxy through Unix sockets.
For public IP paths, Cloud Run provides encryption and connects using the Cloud SQL Auth proxy through Unix sockets. For private IP paths, your application will connect directly to your instance through Serverless VPC Access.
If you are adding a connection to a Cloud SQL instance in your project, select the desired Cloud SQL instance from the dropdown menu. If you are using a Cloud SQL instance from another project, select custom connection string in the dropdown and then enter the full instance connection name in the format PROJECT-ID:REGION:INSTANCE-ID .
This log was recently added in the Cloud Run data path to provide more context for debugging CloudSQL connectivity issues. However, the original logic was overly aggressive, emitting this message even for properly working CloudSQL connections. Your application is working correctly and should not receive this warning.
Thank you for reporting this issue. The fix is ready and should roll out soon. You should not see this message anymore after the fix is out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With