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.
Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/
Background of the issue:
I am experiencing issues with WPML on my site hidden link. The plugin generates slow database queries, causing the site to remain stuck on loading and occasionally bringing down the server. Here is an example from the logs: [Thu Sep 12 06:29:46.744877 2024] [php7:notice] [pid 4427] [client 10.10.12.59:21834] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query UPDATE `ad_options` SET `option_value` = '1726122586' WHERE `option_name` = 'wpml.WPML\TM\Settings\ProcessNewTranslatableFields.lock' made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WPML\LIB\WP\Hooks::WPML\LIB\WP\{closure}, WPML\FP\Promise->resolve, WPML\FP\Right->chain, WPML\FP\Right->map, WPML\BackgroundTask\BackgroundTaskLoader->WPML\BackgroundTask\{closure}, WPML\BackgroundTask\BackgroundTaskLoader->getSerializedTasks, WPML\FP\Fns::__callStatic, call_user_func_array, WPML\FP\Fns::WPML\FP\{closure}, call_user_func_array, WPML\FP\Fns::WPML\FP\{closure}, array_map, WPML\BackgroundTask\BackgroundTaskLoader->WPML\BackgroundTask\{closure}, WPML\BackgroundTask\BackgroundTaskViewModel::get, WPML\Utilities\Lock->create, update_option, W3TC\DbCache_WpdbNew->update, W3TC\DbCache_WpdbInjection_QueryCaching->update, W3TC\_CallUnderlying->update, W3TC\DbCache_WpdbNew->update, W3TC\DbCache_WpdbInjection->update, W3TC\DbCache_WpdbNew->default_update, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_WpdbNew->default_query, referer: hidden link
Symptoms:
The plugin generates slow database queries, causing the site to remain stuck on loading and occasionally bringing down the server. WordPress database error Deadlock found when trying to get lock; try restarting transaction.
Questions:
How can I resolve the slow query issue with WPML?
What steps can I take to prevent the server from going down due to WPML?
Is there a way to optimize WPML to avoid deadlock errors?
thanks for contacting us. This is a known issue, and we are working ona permanent fix for future versions, in the meantime, you can follow the next errata and workaround there for any updates: