Postgres connection string

47 views
Skip to first unread message

Adam Woloszyn

unread,
May 4, 2020, 1:30:54 PM5/4/20
to Google App Engine
Greetings,
New to appengine and trying to receive some support regarding my connection to a postgres database from a .NET application I'm deploying. Here are some details:

App.yaml:
beta_settings:
cloud_sql_instances: "my-project:us-west1:dbName=tcp:5432"

appsettings.json:

"AppDbContext": "Uid=username;Pwd=*****;Host=cloudsql;Database=dbName",

Any ideas on what I might be doing wrong? I just get "Exception: Error while connecting"
alt-svc: h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"  content-type: text/plain; charset=utf-8  date: Mon, 04 May 2020 16:02:14 GMT  server: Kestrel  status: 400  via: 1.1 google 

Thanks!Adam

yananc

unread,
May 5, 2020, 12:30:33 AM5/5/20
to Google App Engine

Hello Adam, 


In order for us to further investigate the issue, please provide more information regarding your app in App Engine and the PostgreSQL instance in Cloud SQL, some of which might include if you are using App Engine Standard or Flexible, how the Cloud SQL instance is set up, if public IP or private IP is used, if the Cloud SQL Admin API is enabled. The documentation [1] provides detailed information on how to connect from App Engine to Cloud SQL PostgreSQL instance, with different tabs for App Engine Standard and Flexible.


And also, please confirm that the Cloud SQL instance can be accessed via other channels, which helps to isolate and further troubleshoot the issue. The documentation ‘Connecting Overview’ [2] provides several options available to connect to a Cloud SQL PostgreSQL instance. 


[1]: https://cloud.google.com/sql/docs/postgres/connect-app-engine#flexible

[2]: https://cloud.google.com/sql/docs/postgres/connect-overview
Reply all
Reply to author
Forward
0 new messages