Tuesday, August 18, 2020

[google-cloud-sql-discuss] Re: Sequelize Connection Error

Hello Shriram,


With my initial research, I have found some reference where it might be related to the configuration of Sequelize [1]. Additionally, I would recommend checking this [2] link to double check if you followed the best practice guidelines related to Cloud SQL. 


As the Google Group is intended to discuss general discussion and not for technical questions, I recommend posting your full detailed question along with the code snippet you are using to Stack Overflow, using the supported Cloud tags.


[1] https://stackoverflow.com/questions/51214792/defining-sequelize-on-google-cloud-sql-nodejs/52706705

[2] https://cloud.google.com/sql/docs/mysql/connect-app-engine-standard



On Tuesday, August 18, 2020 at 9:11:45 AM UTC-4, Shriram Rajaraman wrote:
I have been using Cloud SQL MySQL as my primary database for my Production Application. The server is hosted on App Engine and the data is inserted into the database via API calls. Of late I have faced 2 instances when the Cloud SQL instance returned "Sequelize Connection Refused error". After debugging, I felt that the instance could have been down then, but its highly available and it was not a maintenance window too as it is scheduled on an offline hour on a weekend and it also has notification and notification emails set up. Any reason why these occurred? These were 2 isolated instances, as the API calls around these requests executed successfully. Here is the error snippet from App Engine logs from the response body

Message: "connect ECONNREFUSED /cloudsql/<project-id>:us-central1:<db>" 
StackTrace: "SequelizeConnectionRefusedError: connect ECONNREFUSED /cloudsql/oit-54743-wca-002-production:us-central1:psu-db-prod at Promise.tap.then.catch.err (/srv/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:123:19) at tryCatcher (/srv/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/srv/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/srv/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/srv/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/srv/node_modules/bluebird/js/release/promise.js:725:18) at _drainQueueStep (/srv/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/srv/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/srv/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/srv/node_modules/bluebird/js/release/async.js:15:14) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5)" 



This message contains information that may be privileged or confidential and is the property of the Quantiphi Inc and/or its affiliates. It is intended only for the person to whom it is addressed. If you are not the intended recipient, any review, dissemination, distribution, copying, storage or other use of all or any portion of this message is strictly prohibited. If you received this message in error, please immediately notify the sender by reply e-mail and delete this message in its entirety

--
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/60ec6819-be0a-4c3a-9817-ccdad5ba4673o%40googlegroups.com.

No comments:

Post a Comment