Tuesday, August 18, 2020

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

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/4a585729-b2cf-46e3-a14a-ba0cde62690fn%40googlegroups.com.

No comments:

Post a Comment