mysql: I have a "Connection lost: The server closed the connection." error, please help!

Hello!

I have an application that use ActionHeroJS + ah-sequelize-plugin + Sequelize ORM + node-mysql.

Sometimes, in realy random times, i see this error:

{"level":"error","message":"! uncaught error from task: Cannot read property 'class' of null on queue default","timestamp":"2014-08-28T00:29:28.572Z"}
{"level":"error","message":"! Error: Connection lost: The server closed the connection.","timestamp":"2014-08-28T00:29:28.572Z"}
{"level":"error","message":"!     at Protocol.end (/var/soft/kidguard-api/node_modules/mysql/lib/protocol/Protocol.js:103:13)","timestamp":"2014-08-28T00:29:28.572Z"}
{"level":"error","message":"!     at Socket.<anonymous> (/var/soft/kidguard-api/node_modules/mysql/lib/Connection.js:88:28)","timestamp":"2014-08-28T00:29:28.572Z"}
{"level":"error","message":"!     at Socket.emit (events.js:117:20)","timestamp":"2014-08-28T00:29:28.572Z"}
{"level":"error","message":"!     at _stream_readable.js:929:16","timestamp":"2014-08-28T00:29:28.572Z"}
{"level":"error","message":"!     at process._tickDomainCallback (node.js:463:13)","timestamp":"2014-08-28T00:29:28.572Z"}
{"level":"error","message":"*","timestamp":"2014-08-28T00:29:28.572Z"}

And after this error my system stops sending requests to mysql at all. If i request any method that uses mysql - request freezes.

Please help to fix this!

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 35 (14 by maintainers)

Commits related to this issue

Most upvoted comments

I use pools. I have 50 connections in the pool with same result… I tryed various params but still nothing.