2

I'm trying to add 4 separate sql's to the beta_settings subheading in my app.yaml file for Python3 Flexible App Engine. When I add the set of 4 together, separated by commas like so:

beta_settings:
   cloud_sql_instances: X1, X2, X3, X4

I receive:

ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred during deployment.

How can I have multiple SQL-instances assigned to the beta-settings?

Thanks :)

Hews
  • 569
  • 6
  • 19

1 Answers1

2

After a bit of searching, I discovered that it's not possible to host multiple TCP connections on the same port. Hence, I needed to add a TCP port to each instance like so, with X representing project-id:connection-name:db

beta_settings:
    cloud_sql_instances: X1=tcp:3306,X2=tcp:3307,...Xn

Note there's no spaces between instances and a unique tcp connection per instance. Mistakes in the app.yaml file sometimes are described as simple ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred during deployment. - this can make for tedious and time-consuming debugging so save yourself the time and double-check syntax!

Good luck!

Hews
  • 569
  • 6
  • 19
  • I could not get this to work. I used this setting: `cloud_sql_instances: project:region:db=tcp:5432,project:region:db-replica=tcp:5433`. I can talk to the first instance in the list on `172.17.0.1:5432`, but I cannot connect to the second instance on `172.17.0.1:5433`. Weirdly enough, the logs show that the first instance is listening on `0.0.0.0` while the second instance is listening on `127.0.0.1`. Not sure why the IPs are different even though I never configured this anywhere. Any idea how to connect to the second instance? There is no documentation for this :( – Ismail Khan Dec 28 '19 at 04:54