question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Handshake inactivity timeout with Node.js v6.2.0 and RDS

See original GitHub issue

I know there is another issue related to an older Node.js version, but I´m facing the same one on the latest Node.js version as well as v4.x.

I´ve also tried several timeout settings, but it´s not getting better.

pool = require('mysql').createPool({
    connectionLimit : 1000,
    connectTimeout  : 60 * 60 * 1000,
    aquireTimeout   : 60 * 60 * 1000,
    timeout         : 60 * 60 * 1000,
    host            : process.env.DB_HOST,
    user            : process.env.DB_USERNAME,
    password        : process.env.DB_PASSWORD,
    database        : process.env.DB_DATABASE
});
Error: Handshake inactivity timeout
    at Handshake.<anonymous> (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/protocol/Protocol.js:160:17)
    at emitNone (events.js:86:13)
    at Handshake.emit (events.js:185:7)
    at Handshake._onTimeout (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:116:8)
    at tryOnTimeout (timers.js:224:11)
    at Timer.listOnTimeout (timers.js:198:5)
    --------------------
    at Protocol._enqueue (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/protocol/Protocol.js:141:48)
    at Protocol.handshake (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/protocol/Protocol.js:52:41)
    at PoolConnection.connect (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/Connection.js:123:18)
    at Pool.getConnection (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/Pool.js:45:23)
    at Pool.releaseConnection (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/Pool.js:146:10)
    at Pool._removeConnection (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/Pool.js:269:8)
    at Pool._purgeConnection (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/Pool.js:250:8)
    at Ping.onOperationComplete [as _callback] (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/Pool.js:91:12)
    at Ping.Sequence.end (/home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
    at /home/ubuntu/node/nodejs-chat-server/node_modules/mysql/lib/protocol/Protocol.js:399:18

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dougwilsoncommented, May 31, 2016

Hi @Mklueh, yes, there is an issue with 4.2.0 (that specific version), but you’re not using it. I haven’t seen this reported before on 6.2.0, and at least some testing here seems to show the timers are working just fine on that version.

Do you think you can walk me through enough such that I can actively reproduce the issue? Then I can attach a debugger to the runtime and determine why it is happening, otherwise, I’m not sure what I can look into :S

0reactions
dougwilsoncommented, Dec 11, 2016

Hi @nmeri17 I’m not certain what your server’s CPU is doing, as you didn’t provide that information 😃 You were questioning the conclusion and reproduction for the problem this specific issue is about, which was caused by CPU, so I was trying to clarify what this issue was about. This is an old, closed issue that was resolved. I’m unsure what issue you are having, but you should probably open a new issue to troubleshoot, so we don’t keep sending the OP an email for every comment we make here 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Handshake inactivity timeout in Node.js MYSQL module
Ok, the timeout comes from the Protocol.js file line:162. If you checkout node-mysql you'll see that it is a variable "timeout" for queries....
Read more >
Error: Handshake inactivity timeout in Node.js v6.9.1 and ...
Its looks like the mySql timeout happen because my internet connection takes a longer time to connect with the server,so basically its a...
Read more >
Error: Handshake inactivity timeout in Node.js MYSQL module
MySQL : Error : Handshake inactivity timeout in Node. js MYSQL module [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >
node js error handshake inactivity timeout
I got a PROTOCOL_SEQUENCE_TIMEOUT when my nodejs API is trying to connect to MySQL RDS instance in AWS. The stack shows Error: Handshake...
Read more >
A brand new website interface for an even better experience!
Error : Handshake inactivity timeout with Node.js v6.2.0 and RDS.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found