I have followed the official tutorial and connected the Cloud Run instance to the Cloud SQL with Postgresql. The problem I face is that whenever the app running in the cloud run tries to access the db, it receives a timeout:
Error: connect ETIMEDOUT <port>:5432 at TCPConnectWrap.afterConnect [as incomplete]
I use express and postgraphile in my node app. My connection to the db code looks like this:
app.use(postgraphile(
"postgres://<user>:<password>@<cloud_sql_public_ip>:5432/<db_name>",
"public",
{
watchPg: true,
graphiql: true,
enhanceGraphiql: true,
}),
);
Am I doing anything wrong?