Error in connecting to DB: Error: Handshake inactivity timeout


Error in connecting to DB: Error: Handshake inactivity timeout



I am running a node.js server which is using mysql DB. I was working fine but suddenly it has started throwing following error.



Below is the stacktrace of the error:


Error in connecting to DB: Error: Handshake inactivity timeout
at Handshake.<anonymous> (/home/ubuntu/backend/node_modules/mysql/lib/protocol/Protocol.js:164:17)
at emitNone (events.js:86:13)
at Handshake.emit (events.js:185:7)
at Handshake._onTimeout (/home/ubuntu/backend/node_modules/mysql/lib/protocol/sequences/Sequence.js:129:8)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
--------------------
at Protocol._enqueue (/home/ubuntu/backend/node_modules/mysql/lib/protocol/Protocol.js:145:48)
at Protocol.handshake (/home/ubuntu/backend/node_modules/mysql/lib/protocol/Protocol.js:52:23)
at PoolConnection.connect (/home/ubuntu/backend/node_modules/mysql/lib/Connection.js:130:18)
at Pool.getConnection (/home/ubuntu/backend/node_modules/mysql/lib/Pool.js:48:16)
at /home/ubuntu/backend/followcopserver.js:232:11
at Layer.handle [as handle_request] (/home/ubuntu/backend/node_modules/express/lib/router/layer.js:95:5)
at next (/home/ubuntu/backend/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/ubuntu/backend/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/ubuntu/backend/node_modules/express/lib/router/layer.js:95:5)
at



Any help is really appreciated.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

api-platform.com Unable to generate an IRI for the item of type

How to set up datasource with Spring for HikariCP?

Display dokan vendor name on Woocommerce single product pages