0

Building an app in deno v1.1.0 and I have it in a docker container. I'm able to connect to my local postgres instance from the container as well as the gcloud postgres instance via the cloudsql proxy and via adding my IP to the authorized networks list.

I've added Cloud SQL Client role to the service account of the Cloud Run service and I've also added the connection as stated in the directions here: https://cloud.google.com/sql/docs/postgres/connect-run#configuring

The SQL instance and Cloud Run service are in the same GCP project.

However, whenever I deploy a revision, I keep facing the same error:

Error: Device or resource busy (os error 16)
avion
  • 1
  • 1
  • How many client are connected to your database? – guillaume blaquiere Jun 22 '20 at 07:42
  • The error message is not very helpful, unless there is something else about the error in the logs can you please provide some simplified reproducible example of your applciation code? – Emil Gi Jun 22 '20 at 07:49
  • Only a single client @guillaumeblaquiere – avion Jun 23 '20 at 03:58
  • @EmilGi Here's an example https://github.com/asontha/busy-app – avion Jun 23 '20 at 04:29
  • Is there anything special needed for the dockerfile for a cloud run service? – avion Jun 23 '20 at 05:21
  • Is Deno postgres lib compliant with unix socket connection? – guillaume blaquiere Jun 23 '20 at 07:48
  • Reproduced the same error and have the same question as @guillaumeblaquiere. Also might be something wrong with cloud sql proxy due to deno runtime restrictions. – Emil Gi Jun 23 '20 at 09:16
  • I have no issues connecting to the cloud sql instance when I run the container locally. I've tried both using `./cloud_sql_proxy` as well as adding my ip to authorized networks list and I'm able to reach the instance hosted in the cloud. It's only when it is deployed to Cloud Run. – avion Jun 24 '20 at 03:22
  • It seems something is wrong with Deno runtime and Cloud Run, I would say open a ticket with support or create a public issue [here].(https://issuetracker.google.com/issues/new?component=608076&template=0) – Emil Gi Jun 24 '20 at 15:13

0 Answers0