GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Troubles with the tutorial: Using Cloud SQL for MySQL (App Engine Flexible Environment) · Issue #664 · GoogleCloudPlatform/nodejs-docs-samples

Troubles with the tutorial: Using Cloud SQL for MySQL (App Engine Flexible Environment) #664

New issue
Copy link
New issue
Copy link
Closed
Closed
Troubles with the tutorial: Using Cloud SQL for MySQL (App Engine Flexible Environment)#664
Copy link

Description

@omidkrad
omidkrad
opened on Jun 15, 2018
Issue body actions

Hi, I followed steps in Using Cloud SQL for MySQL (App Engine Flexible Environment)

Everything worked and deployed successfully (8 min 21 sec for deploying?!!) until gcloud app browse that goes to the URL with "Internal Server Error" message.

And the log shows Error: connect ECONNREFUSED 127.0.0.1:3306

Question 1: Why does deploy of a simple app take so long to complete even on subsequent runs?

When testing locally using Cloud SQL Proxy we know that 127.0.0.1 is proxied to the Cloud SQL database that we specify in the command line like this:

./cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:3306 -credential_file=$GCLOUD_CERTIFICATE_FILE

but the tutorial does not explain how possibly after deployment it is supposed to connect to the database instance, since we don't have the proxy configuration on the server. And so it fails with the above error as one may expect.

Question 2: How is the app supposed to connect to the sql instance when deployed?

App.flexible.yaml file says "Do not add this file to your source control." Is that really the recommended way to handle app.yaml files? It does not make sense that the application configuration file should be maintained outside of the repository.

Question 3: What is the correct way to manage app.yaml and sensitive data in it?

Thanks!

Reacted by David Lung

Activity

  1. omidkrad commented on Jun 15, 2018

    @omidkrad
    omidkrad
    on Jun 15, 2018
    Author
    More actions

    I found the answer to my Question 2, the instance name is set in App.flexible.yaml env_variables.INSTANCE_CONNECTION_NAME. The confusing part in the doc is where it says "If you configured the proxy to use Unix sockets, set this additional environment variable" which implies that it may not be needed if using TCP Sockets. I think the documentation should mention that it is needed for deployment.

  2. fhinkel commented on Nov 10, 2018

    @fhinkel
    fhinkel
    on Nov 10, 2018
    Contributor
    More actions

    I'd recommend using the App Engine Standard Environment: https://cloud.google.com/appengine/docs/standard/nodejs/using-cloud-sql

    Deployment only takes a few seconds instead of 10 minutes.

  3. fhinkel
    closed this as completedon Nov 10, 2018
  4. akedevs commented on Sep 16, 2019

    @akedevs
    akedevs
    on Sep 16, 2019
    More actions

    Too hard inplement this solution , 1 month try to connect local and when deploy still
    error , I don't know why doucment on github never work .

  5. Shabirmean
    added a commit that references this issue on Feb 16, 2023

    chore: release 3.2.1 (#664)

    b9e6ba0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.