Skip to content

Error: Handshake inactivity timeout #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Suhov-Igor opened this issue Oct 19, 2015 · 9 comments
Closed

Error: Handshake inactivity timeout #316

Suhov-Igor opened this issue Oct 19, 2015 · 9 comments

Comments

@Suhov-Igor
Copy link

Hello, I had an error:

Handshake inactivity timeout
at Handshake. (/usr/local/lib/node_modules/db-migrate/node_modules/mysql/lib/protocol/Protocol.js:154:17)
at emitNone (events.js:67:13)
at Handshake.emit (events.js:166:7)
at Handshake._onTimeout (/usr/local/lib/node_modules/db-migrate/node_modules/mysql/lib/protocol/sequences/Sequence.js:116:8)
at Timer.listOnTimeout (timers.js:92:15)
--------------------
at Protocol._enqueue (/usr/local/lib/node_modules/db-migrate/node_modules/mysql/lib/protocol/Protocol.js:135:48)
at Protocol.handshake (/usr/local/lib/node_modules/db-migrate/node_modules/mysql/lib/protocol/Protocol.js:52:41)
at Connection.connect (/usr/local/lib/node_modules/db-migrate/node_modules/mysql/lib/Connection.js:123:18)
at Object.exports.connect (/usr/local/lib/node_modules/db-migrate/lib/driver/mysql.js:452:6)
at Object.exports.connect (/usr/local/lib/node_modules/db-migrate/lib/driver/index.js:12:10)
at Object.exports.connect (/usr/local/lib/node_modules/db-migrate/index.js:12:10)
at executeUp (/usr/local/lib/node_modules/db-migrate/bin/db-migrate:215:9)
at run (/usr/local/lib/node_modules/db-migrate/bin/db-migrate:340:9)
at Object. (/usr/local/lib/node_modules/db-migrate/bin/db-migrate:368:1)
at Module._compile (module.js:435:26)

after using "db-migrate up" command.

System characrteristics: - db-migrate v. 0.9.23 - npm v. 3.3.9 - async v. 1.4.2 - mysql driver v. 3.3.9 - mysql db v. 5.6.22 - OS X Yosemity v. 10.10.5 - node v. 4.2.0

local machine

@wzrdtales
Copy link
Member

@Suhov-Igor Ok, as this error occurs on the connection establishment, this is an error with node-mysql.

Can you tell me how you configured to connect to this db?

  • Where is the database located, local or remote?
  • Do you use tls?
  • Do you connect via unix socket?

The best would be if you could copy paste your configuration file, naturally replace sensitive informations like passwords with dummy objects ;)

@Suhov-Igor
Copy link
Author

database.json content:

"dev": {
"host": "localhost",
"user": "****",
"password" : "**
**",
"database": "testdb",
"driver": "mysql",
"multipleStatements": true
}

local db,
I don't use any sockets or tls connections

@wzrdtales
Copy link
Member

interesting is there something special about your database config itself? As this seems to timeout while connecting.

@Suhov-Igor
Copy link
Author

All was good, until I update db-migrate, node and npm to latest version

@wzrdtales
Copy link
Member

@Suhov-Igor Ok, I assume this is something that was introduced within the node-mysql module, which has been updated in 0.9.x.

The problem is, it is really hard to help you, if I'm not able to reproduce your failure. I installed several versions of mysql and everything works out of the box.Thus I'm in the need of more details to be able to help you.

@wzrdtales
Copy link
Member

Probably your database is very slow and responds not in time:
mysqljs/mysql#883

Try to adjust your config like this and try again, maybe this helps already...

"dev": {
   "host": "localhost",
  "user": "**",
  "password" : "**",
  "database": "testdb",
  "driver": "mysql",
  "multipleStatements": true,
  "acquireTimeout": 60000
}

@Suhov-Igor
Copy link
Author

I try this options with 100000 value. And nothing change, after that I wrote to you)))

@wzrdtales
Copy link
Member

@Suhov-Igor ok, I can't do anything for you other than searching for issues on this in the node-mysql project. As I need to be able to reproduce this.

You say you're using node 4.2.0:

mysqljs/mysql#1241
mysqljs/mysql#1239

There is this bug suggesting to update to 4.2.1 because of a bug in 4.2.0, this seems to match with your experience.

@Suhov-Igor
Copy link
Author

Thank you very much, it helped me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants