{"action":"reopened","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/1478","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/1478/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/1478/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/1478/events","html_url":"https://github.com/sequelize/sequelize/issues/1478","id":28997751,"number":1478,"title":"ER_LOCK_DEADLOCK","user":{"login":"jValdron","id":1385850,"avatar_url":"https://avatars.githubusercontent.com/u/1385850?v=3","gravatar_id":"","url":"https://api.github.com/users/jValdron","html_url":"https://github.com/jValdron","followers_url":"https://api.github.com/users/jValdron/followers","following_url":"https://api.github.com/users/jValdron/following{/other_user}","gists_url":"https://api.github.com/users/jValdron/gists{/gist_id}","starred_url":"https://api.github.com/users/jValdron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jValdron/subscriptions","organizations_url":"https://api.github.com/users/jValdron/orgs","repos_url":"https://api.github.com/users/jValdron/repos","events_url":"https://api.github.com/users/jValdron/events{/privacy}","received_events_url":"https://api.github.com/users/jValdron/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sequelize/sequelize/labels/feature","name":"feature","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-03-07T20:55:16Z","updated_at":"2015-05-17T12:47:52Z","closed_at":null,"body":"Hey guys,\r\n\r\nI received an automated error from my staging server the other day with a ER_LOCK_DEADLOCK error.\r\n\r\nThat server is running MySQL on Amazon RDS. Here's the full error log:\r\n\r\n```json\r\n{\"date\":\"Thu Feb 27 2014 18:15:56 GMT+0000 (UTC)\",\"process\":{\"pid\":5629,\"uid\":0,\"gid\":0,\"cwd\":\"/srv/www/di_api/releases/20140226211654\",\"execPath\":\"/usr/local/bin/node\",\"version\":\"v0.10.25\",\"argv\":[\"/usr/local/bin/node\",\"/srv/www/di_api/current/server.js\"],\"memoryUsage\":{\"rss\":323936256,\"heapTotal\":262785344,\"heapUsed\":179888024}},\"os\":{\"loadavg\":[0.1748046875,0.06005859375,0.05859375],\"uptime\":679004.790621176},\"trace\":[{\"column\":14,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/sequences/Sequence.js\",\"function\":\"Query.Sequence._packetToError\",\"line\":30,\"method\":\"Sequence._packetToError\",\"native\":false},{\"column\":18,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/sequences/Query.js\",\"function\":\"Query.ErrorPacket\",\"line\":82,\"method\":\"ErrorPacket\",\"native\":false},{\"column\":24,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/Protocol.js\",\"function\":\"Protocol._parsePacket\",\"line\":197,\"method\":\"_parsePacket\",\"native\":false},{\"column\":12,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/Parser.js\",\"function\":\"Parser.write\",\"line\":62,\"method\":\"write\",\"native\":false},{\"column\":16,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/Protocol.js\",\"function\":\"Protocol.write\",\"line\":37,\"method\":\"write\",\"native\":false},{\"column\":26,\"file\":\"stream.js\",\"function\":\"Socket.ondata\",\"line\":51,\"method\":\"ondata\",\"native\":false},{\"column\":20,\"file\":\"events.js\",\"function\":\"Socket.EventEmitter.emit\",\"line\":117,\"method\":\"EventEmitter.emit\",\"native\":false},{\"column\":14,\"file\":\"_stream_readable.js\",\"function\":\"\",\"line\":746,\"method\":null,\"native\":false},{\"column\":17,\"file\":\"events.js\",\"function\":\"Socket.EventEmitter.emit\",\"line\":92,\"method\":\"EventEmitter.emit\",\"native\":false},{\"column\":10,\"file\":\"_stream_readable.js\",\"function\":\"emitReadable_\",\"line\":408,\"method\":null,\"native\":false},{\"column\":null,\"file\":\"    --------------------\",\"function\":null,\"line\":null,\"method\":null,\"native\":null},{\"column\":26,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/Protocol.js\",\"function\":\"Protocol._enqueue\",\"line\":110,\"method\":\"_enqueue\",\"native\":false},{\"column\":25,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/Connection.js\",\"function\":\"Connection.query\",\"line\":148,\"method\":\"query\",\"native\":false},{\"column\":34,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/newrelic/lib/instrumentation/mysql.js\",\"function\":\"\",\"line\":61,\"method\":null,\"native\":false},{\"column\":17,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/newrelic/node_modules/continuation-local-storage/context.js\",\"function\":\"\",\"line\":62,\"method\":null,\"native\":false},{\"column\":63,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/newrelic/lib/transaction/tracer.js\",\"function\":\"Connection.wrapSegmentInvocation [as query]\",\"line\":178,\"method\":\"wrapSegmentInvocation [as query]\",\"native\":false},{\"column\":17,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/sequelize/lib/dialects/mysql/query.js\",\"function\":\"module.exports.Query.run\",\"line\":26,\"method\":\"exports.Query.run\",\"native\":false},{\"column\":23,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/sequelize/lib/dialects/mysql/connector-manager.js\",\"function\":\"\",\"line\":410,\"method\":null,\"native\":false},{\"column\":15,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/sequelize/lib/emitters/custom-event-emitter.js\",\"function\":\"\",\"line\":105,\"method\":null,\"native\":false},{\"column\":17,\"file\":\"events.js\",\"function\":\"EventEmitter.emit\",\"line\":95,\"method\":\"emit\",\"native\":false},{\"column\":33,\"file\":\"/srv/www/di_api/releases/20140226211654/node_modules/sequelize/lib/emitters/custom-event-emitter.js\",\"function\":\"module.exports.CustomEventEmitter.emit\",\"line\":61,\"method\":\"exports.CustomEventEmitter.emit\",\"native\":false}],\"stack\":[\"Error: ER_LOCK_DEADLOCK: Deadlock found when trying to get lock; try restarting transaction\",\"    at Query.Sequence._packetToError (/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/sequences/Sequence.js:30:14)\",\"    at Query.ErrorPacket (/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/sequences/Query.js:82:18)\",\"    at Protocol._parsePacket (/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/Protocol.js:197:24)\",\"    at Parser.write (/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/Parser.js:62:12)\",\"    at Protocol.write (/srv/www/di_api/releases/20140226211654/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:746:14)\",\"    at Socket.EventEmitter.emit (events.js:92:17)\",\"    at emitReadable_ (_stream_readable.js:408:10)\",\"    --------------------\",\"    at Protocol._enqueue (/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/protocol/Protocol.js:110:26)\",\"    at Connection.query (/srv/www/di_api/releases/20140226211654/node_modules/mysql/lib/Connection.js:148:25)\",\"    at Connection.<anonymous> (/srv/www/di_api/releases/20140226211654/node_modules/newrelic/lib/instrumentation/mysql.js:61:34)\",\"    at Connection.<anonymous> (/srv/www/di_api/releases/20140226211654/node_modules/newrelic/node_modules/continuation-local-storage/context.js:62:17)\",\"    at Connection.wrapSegmentInvocation [as query] (/srv/www/di_api/releases/20140226211654/node_modules/newrelic/lib/transaction/tracer.js:178:63)\",\"    at module.exports.Query.run (/srv/www/di_api/releases/20140226211654/node_modules/sequelize/lib/dialects/mysql/query.js:26:17)\",\"    at Function.<anonymous> (/srv/www/di_api/releases/20140226211654/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:410:23)\",\"    at null.<anonymous> (/srv/www/di_api/releases/20140226211654/node_modules/sequelize/lib/emitters/custom-event-emitter.js:105:15)\",\"    at EventEmitter.emit (events.js:95:17)\",\"    at module.exports.CustomEventEmitter.emit (/srv/www/di_api/releases/20140226211654/node_modules/sequelize/lib/emitters/custom-event-emitter.js:61:33)\"]}\r\n```\r\n\r\nNo user actually reported an error, but I got this exception. It's obviously due to transactions or something, but I'm not using transactions explicitly. Anyone has a clue about why this would happen?"}}