-
Notifications
You must be signed in to change notification settings - Fork 953
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
Mysql2::Error: Deadlock found when trying to get lock; try restarting transaction: #277
Comments
What version of delayed_job is this? Looks like 2.1.3, which is broken. Have On Mon, Aug 8, 2011 at 5:43 PM, bluescripts <
|
Was using 2.1.2 -- will try upgrading and let you know. |
Fixed :) thanks! |
I'm seeing this same issue with 6 workers using the following gems;
This is the error;
This error is causing workers to die. |
This happens to me as well. How to fix this? |
Same issue here |
I opened collectiveidea/delayed_job_active_record#63 to track the issue with https://github.com/collectiveidea/delayed_job_active_record |
Any ideas on where to find this in the source or how to patch it/fix it?
I'm getting this when running 15 workers, 2 are deadlocking on the same job:
Mysql2::Error: Deadlock found when trying to get lock; try restarting transaction: UPDATE
delayed_jobs
SET locked_at = '2011-08-08 21:30:10', locked_by = 'delayed_job.10 host:226237 pid:27929' WHERE ((run_at <= '2011-08-08 21:30:10' AND (locked_at IS NULL OR locked_at < '2011-08-08 21:15:10') OR locked_by = 'delayed_job.10 host:226237 pid:27929') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1Mysql2::Error: Deadlock found when trying to get lock; try restarting transaction: UPDATE
delayed_jobs
SET locked_at = '2011-08-08 21:30:10', locked_by = 'delayed_job.0 host:226237 pid:27869' WHERE ((run_at <= '2011-08-08 21:30:10' AND (locked_at IS NULL OR locked_at < '2011-08-08 21:15:10') OR locked_by = 'delayed_job.0 host:226237 pid:27869') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1This is causing the job workers to die.
The text was updated successfully, but these errors were encountered: