Saturday, March 24, 2018

[google-cloud-sql-discuss] Re: CloudSQL connection issues with deployed Bookshelf tutorial app (App Engine/NodeJS)

Hi Dinesh,

For the technical query, 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,
 

On Saturday, March 24, 2018 at 12:59:34 PM UTC-4, Dinesh Kumar wrote:
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. 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/ba193a38-dcd5-4898-a9c8-25640f3def9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment