Today I just wanted to make some of our groups accessible by CiviMail by checking the mailinglist group type checkbox. But this took long time (more than 10 minutes) no matter if I did this for a group with about 10 or about 2k contacts. I also tried via group api, same same.
The ui ajax call responds with error and the corresponding log entry states:
"DB Error: unknown error", -1, 16, (Array:2), "INSERT IGNORE INTO civicrm_group_contact_cache (group_id,contact_id) VALUES (...") [...] Deadlock found when trying to get lock; try restarting transaction
We have somewhere around 180k contacts and 2k groups. Civi is 4.6.10. CMS is current Drupal 7, DB is Mysql 5.5.46.
Any ideas on how to solve it or investigate on?