CloudSQL connection issues with deployed Bookshelf tutorial app (App Engine/NodeJS)

46 views
Skip to first unread message

Dinesh Kumar

unread,
Mar 24, 2018, 12:59:34 PM3/24/18
to Google Cloud SQL discuss
i deployed the my code on app engine with node js (flex environment). 
 ==========================================
config.json 

{
  "GCLOUD_PROJECT": "XXXXXX",
  "DATA_BACKEND": "cloudsql",
  "MYSQL_USER": "XXXX",
  "MYSQL_PASSWORD": "XXXXX",
  "INSTANCE_CONNECTION_NAME": "XXXXXX:us-central1:XXXXX"
}

===============================================================
model-cloudsql.js

const options = {
  user: config.get('MYSQL_USER'),
  password: config.get('MYSQL_PASSWORD'),
  database: 'XXXXX'
};

if (config.get('INSTANCE_CONNECTION_NAME') && config.get('NODE_ENV') === 'production') {
  options.socketPath = `/cloudsql/${config.get('INSTANCE_CONNECTION_NAME')}`;

}

const connection = mysql.createConnection(options);


i am getting the error : "Cannot enqueue Query after fatal error."

please provides any feedback on it. 

Dinesh (Google Platform Support)

unread,
Mar 24, 2018, 3:53:27 PM3/24/18
to google-cloud...@googlegroups.com
Hi Dinesh,

For the technical queries, debugging and troubleshooting Stack overflow and Server fault communities are better suited. Google Group is meant for general project and service related discussions. You may want to review community support document to have a better idea which community is better suited for your query. I understand stack overflow is better suited for this query. 

Having said that, you may try troubleshooting suggestions provided on this thread for a somewhat similar issue. 

Regards,
Reply all
Reply to author
Forward
0 new messages