This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is experiencing 'Deadlock found when trying to get lock; try restarting transaction' errors in their PHP error log, followed by fatal errors. They have already truncated the icl_background_task table as a preliminary step.
Solution:
We recommend performing a full site backup before proceeding with any further steps. After ensuring the backup is secure, please follow the workaround provided in our errata page to address backend slowness and duplicated queries which might be related to your issue. You can find the detailed instructions here: WPML causing backend slowness and duplicated queries.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic is split from https://wpml.org/forums/topic/frequently-site-going-down-with-black-page/