Thank you Dmitry for the details.
I can see a different problem here. You are using INSERT IGNORE statements, like:
INSERT IGNORE INTO arts_deploy ...
INSERT IGNORE INTO users ...
Can you confirm any of these tables is MyISAM? If yes, then there is this bug - lp:1236378 which shows a similar problem. Basically after any INSERT IGNORE a node becomes completely blocked.
Thank you Dmitry for the details.
I can see a different problem here. You are using INSERT IGNORE statements, like:
INSERT IGNORE INTO arts_deploy ...
INSERT IGNORE INTO users ...
Can you confirm any of these tables is MyISAM? If yes, then there is this bug - lp:1236378 which shows a similar problem. Basically after any INSERT IGNORE a node becomes completely blocked.