Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm running a bunch of scripts in parallel that do:


On my 8-core machine, where 8 of these processes are running in parallel, about 1% of the processes die with a deadlock complaint from MySQL. That is, about 10,000 out of the 1,000,000 jobs I'm running die this way:

umysql.SQLError: (1213, 'Deadlock found when trying to get lock; try restarting transaction')

On my 16-core machine (actually a Google Compute Engine machine), I get no deadlocks.

Both machines are running the same version of MySQL on the local machine where the processes are running.

I expected the 16-core machine to have more deadlocks since there are more processes running in parallel. Why would the 8-core machine have more deadlocks than the 16-core?

share|improve this question
Sounds more like an application design issue than anything else.... –  Phil Jan 30 '14 at 10:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.