ER_LOCK_WAIT_TIMEOUT not caught

682 views
Skip to first unread message

Piotr Rybałtowski

unread,
Jul 29, 2013, 4:27:17 AM7/29/13
to sequ...@googlegroups.com
Below I paste an error (with stack trace) which kicks out of the application. Usually such errors can be caught with .error() function but this one kills the app. Any idea what could be wrong? Is it sequelize thing or something to configure in mysql module?

Thanks for any help!



Error: ER_LOCK_WAIT_TIMEOUT: Lock wait timeout exceeded; try restarting transaction
    at Query.Sequence._packetToError (/home/mygalomorph2/mygalomorph/node_modules/mysql/lib/protocol/sequences/Sequence.js:32:14)
    at Query.ErrorPacket (/home/mygalomorph2/mygalomorph/node_modules/mysql/lib/protocol/sequences/Query.js:82:18)
    at Protocol._parsePacket (/home/mygalomorph2/mygalomorph/node_modules/mysql/lib/protocol/Protocol.js:172:24)
    at Parser.write (/home/mygalomorph2/mygalomorph/node_modules/mysql/lib/protocol/Parser.js:62:12)
    at Protocol.write (/home/mygalomorph2/mygalomorph/node_modules/mysql/lib/protocol/Protocol.js:37:16)
    at Socket.ondata (stream.js:51:26)
    at Socket.EventEmitter.emit (events.js:117:20)
    at Socket.<anonymous> (_stream_readable.js:736:14)
    at Socket.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:408:10)
    --------------------
    at Query.Sequence (/home/mygalomorph2/mygalomorph/node_modules/mysql/lib/protocol/sequences/Sequence.js:15:20)
    at new Query (/home/mygalomorph2/mygalomorph/node_modules/mysql/lib/protocol/sequences/Query.js:12:12)
    at Function.Connection.createQuery (/home/mygalomorph2/mygalomorph/node_modules/mysql/lib/Connection.js:48:10)
    at Connection.query (/home/mygalomorph2/mygalomorph/node_modules/mysql/lib/Connection.js:100:26)
    at module.exports.Query.run (/home/mygalomorph2/mygalomorph/node_modules/sequelize/lib/dialects/mysql/query.js:26:17)
    at module.exports.execQueueItem (/home/mygalomorph2/mygalomorph/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:334:21)
    at /home/mygalomorph2/mygalomorph/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:290:25
    at dispense (/home/mygalomorph2/mygalomorph/node_modules/sequelize/node_modules/generic-pool/lib/generic-pool.js:247:16)
    at Object.me.release (/home/mygalomorph2/mygalomorph/node_modules/sequelize/node_modules/generic-pool/lib/generic-pool.js:341:5)
    at module.exports.dequeue (/home/mygalomorph2/mygalomorph/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:304:17)
    at module.exports.afterQuery (/home/mygalomorph2/mygalomorph/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:321:13)

Daniel Durante

unread,
Jul 29, 2013, 7:42:06 PM7/29/13
to sequ...@googlegroups.com
Neither, it's a MySQL issue. You have a lock that's preventing MySQL to read/write data to the table (I'm assuming you're using MyISAM, this rarely happens on an InnoDB/ACID-complaint engine). Have you tried restarting your MySQL daemon?

Piotr Rybałtowski

unread,
Jul 30, 2013, 2:09:45 AM7/30/13
to sequ...@googlegroups.com
I know where the problem originates. But why it's thrown without catching and exiting my application. Isn't the Model.find().error(err) method the place to have such error? It is about 50% when the error is caught and the rest makes my app crash.
Reply all
Reply to author
Forward
0 new messages