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 — App Engine and Cloud SQL - connection lost issue · Issue #163 · GoogleCloudPlatform/nodejs-docs-samples

App Engine and Cloud SQL - connection lost issue #163

New issue
Copy link
New issue
Copy link
Closed
Closed
App Engine and Cloud SQL - connection lost issue#163
Copy link
Labels
🚨This issue needs some love.triage meI really want to be triaged.

Description

@martinmicunda
martinmicunda
opened on Aug 10, 2016
Issue body actions

Hi,

I have forked the appengine/cloudsql project and deployed to google cloud however I am getting follow error Connection lost: The server closed the connection. each time I deploy the app. I am able to run application on my local machine using cloud_sql_proxy without any problem so it seems the issue is somewhere between app engine and cloud sql as Mysql connection is always dropping..

In app.yaml I am using follow MYSQL_SOCKET_PATH: /cloudsql/[YOUR_PROJECT_ID]:[YOUR_REGION]:[YOUR_INSTANCE_NAME]

Are there any changes in configuration or doc that I am missing?

P.S.: I am using second generation of Cloud SQL.

Thanks,
Martin

Activity

  1. jmdobry commented on Aug 10, 2016

    @jmdobry
    jmdobry
    on Aug 10, 2016
    Member
    More actions

    Can you post the exact contents of app.yaml?

  2. martinmicunda commented on Aug 10, 2016

    @martinmicunda
    martinmicunda
    on Aug 10, 2016
    Author
    More actions

    The Connection lost: The server closed the connection error means that at least credentials are correct otherwise I would see ENOENT or access denied error message so there might be something wrong with socket.

    runtime: nodejs
    vm: true
    
    env_variables:
      MYSQL_USER: [YOUR_USER]
      MYSQL_PASSWORD: [YOUR_PASSWORD]
      MYSQL_DATABASE: [YOUR_DATABASE]
      MYSQL_SOCKET_PATH: /cloudsql/[YOUR_PROJECT_ID]:[YOUR_REGION]:[YOUR_INSTANCE_NAME]
    
    beta_settings:
      cloud_sql_instances: [YOUR_PROJECT_ID]:[YOUR_REGION]:[YOUR_INSTANCE_NAME]
  3. jmdobry commented on Aug 10, 2016

    @jmdobry
    jmdobry
    on Aug 10, 2016
    Member
    More actions

    You need to replace all of the variables with your actual values, e.g. [YOUR_PROJECT_ID] => my-project, [YOUR_USER] => my-user-name, etc.

  4. martinmicunda commented on Aug 10, 2016

    @martinmicunda
    martinmicunda
    on Aug 10, 2016
    Author
    More actions

    I know :) so let's assume [YOUR_PROJECT_ID] is name of your project id that you can get from Cloud SQL console then app.yaml looks like this:

    runtime: nodejs
    vm: true
    
    env_variables:
      MYSQL_USER: root
      MYSQL_PASSWORD: pass
      MYSQL_DATABASE: test1
      MYSQL_SOCKET_PATH: /cloudsql/[YOUR_PROJECT_ID]:us-central1:test
    
    beta_settings:
      cloud_sql_instances: [YOUR_PROJECT_ID]:us-central1:test
  5. jmdobry commented on Aug 10, 2016

    @jmdobry
    jmdobry
    on Aug 10, 2016
    Member
    More actions

    I just successfully deployed the Cloud SQL sample to https://sql-dot-nodejs-docs-samples.appspot.com/ using:

    runtime: nodejs
    vm: true
    env_variables:
      MYSQL_USER: myuser
      MYSQL_PASSWORD: mypassword
      MYSQL_DATABASE: nodejs-docs-samples
      MYSQL_SOCKET_PATH: /cloudsql/nodejs-docs-samples:us-central1:nodejs-docs-samples
    beta_settings:
      cloud_sql_instances: nodejs-docs-samples:us-central1:nodejs-docs-samples

    Assuming you've made no alterations to the sample and you've already successfully connected to your Cloud SQL instance from your local computer to verify that your test1 database exists, then I don't know what the problem could be. I'll have to open an issue.

  6. martinmicunda commented on Aug 10, 2016

    @martinmicunda
    martinmicunda
    on Aug 10, 2016
    Author
    More actions

    I found where the problem was. I had to enable the Cloud SQL Administration API and everything works fine now. Thanks for help ;)

  7. martinmicunda
    closed this as completedon Aug 11, 2016
  8. jmdobry commented on Aug 11, 2016

    @jmdobry
    jmdobry
    on Aug 11, 2016
    Member
    More actions

    Ah, I didn't think of that.

  9. yoshi-automation
    added
    triage meI really want to be triaged.
    🚨This issue needs some love.
    on Apr 6, 2020
  10. kweinmeister
    added a commit that references this issue on Nov 7, 2022

    chore: release 2.3.1 (#163)

    1619b04
  11. ahrarmonsur
    added a commit that references this issue on Nov 8, 2022

    test: fix failing tests due to leaks (#163)

    ad9cd60
  12. kweinmeister
    added 2 commits that reference this issue on Nov 8, 2022

    chore: release 2.3.1 (#163)

    e07d9c1

    chore: release 2.3.1 (#163)

    b216154
  13. pattishin
    added 3 commits that reference this issue on Nov 9, 2022

    chore: release 2.3.1 (#163)

    dc510f5

    chore: release 2.3.1 (#163)

    e9d5835

    chore: release 2.3.1 (#163)

    74b48a7
  14. ace-n
    added a commit that references this issue on Nov 10, 2022

    test: fix failing tests due to leaks (#163)

    328c888
  15. kweinmeister
    added a commit that references this issue on Nov 10, 2022

    chore(deps): lock file maintenance (#163)

    55e6ecc
  16. ace-n
    added 2 commits that reference this issue on Nov 11, 2022

    chore(deps): lock file maintenance (#163)

    c8c4417

    chore(deps): lock file maintenance (#163)

    d11827f
  17. NimJay
    added a commit that references this issue on Nov 11, 2022

    chore: release 2.3.1 (#163)

    876db02
  18. ace-n
    added a commit that references this issue on Nov 16, 2022

    docs: add create agent code sample (#163)

    d667927
  19. unforced
    added 2 commits that reference this issue on Nov 17, 2022

    chore: release 3.2.2 (#163)

    fb65a32

    chore: release 3.2.2 (#163)

    0ebdc9b
  20. ahrarmonsur
    added a commit that references this issue on Nov 17, 2022

    chore: release 3.2.2 (#163)

    6c7e29a
  21. ace-n
    added a commit that references this issue on Nov 17, 2022

    docs: add create agent code sample (#163)

    d9f659a
  22. NimJay
    added 2 commits that reference this issue on Nov 18, 2022

    chore: release 2.1.0 (#160)

    232972f

    chore: release 2.1.0 (#160)

    190c8aa
  23. ace-n
    added a commit that references this issue on Nov 21, 2022

    migrate code from googleapis/nodejs-dialogflow-cx (#2854)

    c0020e4
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

    🚨This issue needs some love.triage meI really want to be triaged.

    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.