We use CiviCRM 5.21.2 with Drupal 7.69 and Webform together with webform_civicrm to provide petitions. The petitions ask for address and email. So every petition signature creates a contact with email and address. Additionally every contact gets a tag and if the email is confirmed with webform_confirm_email in some cases a group.
If the load on this webform submission gets higher we face deadlocks. Some of them seem to connected to group cache and acl cache and some to email or address inserts.
I saw that the tables email and address have triggers defined for insert, update and delete that write into the table contact. For example:
UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = NEW.contact_id;
Is it possible that these triggers have something to do with at least some of the deadlocks. Or that they at least make the chance higher to run into a deadlock?
Does anybody know, why they are there? Is it necessary to update the modified_date in the table contact immediately or would it be sufficient for the system if this is done by a cron job that runs once per day?