Skip Navigation

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/
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Madrid (GMT+01:00)

Tagged: 

This topic contains 8 replies, has 1 voice.

Last updated by Marcel 1 day, 14 hours ago.

Assisted by: Marcel.

Author Posts
December 9, 2024 at 8:00 am #16491239

Daniel Dorado

Background of the issue:
I am trying to: it's hanging my database server and php-fpm. Link to a page where the issue can be seen: hidden link

Symptoms:
My logs are flooded. WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT IGNORE INTO sibz_6_options ( `option_name`, `option_value`, `autoload` ) VALUES ('wpml.WPML\TM\Settings\ProcessNewTranslatableFields.lock', '1733727120', 'no') /* LOCK */. PHP Warning: Attempt to read property "post_title" on null in /var/www/html/ibser/wp-content/themes/wpestate/libs/help_functions.php on line 1122. PHP Warning: Undefined variable $hook in /var/www/html/ibser/wp-content/plugins/availability-calendar/availability-calendar.php on line 29.

Questions:
How can I resolve the database deadlock error?
What is causing the PHP warnings in my logs?

December 9, 2024 at 8:09 am #16491266

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

You can resolve this issue by following the steps outlined here: https://wpml.org/errata/wpml-causing-backend-slowness-and-duplicated-queries/.

Best regards,
Marcel

December 9, 2024 at 8:19 am #16491303

Daniel Dorado

09-Dec-2024 06:52:00 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT IGNORE INTO sibz_6_options ( `option_name`, `option_value`, `autoload` ) VALUES ('wpml.WPML\\TM\\Settings\\ProcessNewTranslatableFields.lock', '1733727120', 'no') /* 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, WPML\Utilities\Lock->create, WPML\Utilities\Lock->create

My logs contain this entry duplicated within the same second hundreds of times

December 9, 2024 at 8:45 am #16491401

Daniel Dorado

I found the workaround of removing the ics_background_tasks table... let see

anyhow your plugin behaves horrible with object cache pro and bricks builder

December 9, 2024 at 9:08 am #16491450

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Please excuse the oversight—the link was not correctly copied to the clipboard, but I have replaced it above. If you encounter any specific issues with Bricks in combination with object caching, please create a separate ticket, and we’ll be happy to investigate further.

Best regards,
Marcel

December 9, 2024 at 9:30 pm #16495265

Daniel Dorado

Now my logs are flooded by this, i'm not runing just one site, i have several wpml installations on this server...

And honestly if the solution is delete a table i cannot imagine the mess this backgroundtask class is making... bacause is spreaded around all these files

grep -rl 'BackgroundTask' .
./vendor/wpml/core-api/core/BackgroundTask/Exception/TaskNotRunnable/TaskIsCompletedException.php
./vendor/wpml/core-api/core/BackgroundTask/Exception/TaskNotRunnable/ExceededMaxRetriesException.php
./vendor/wpml/core-api/core/BackgroundTask/Exception/TaskNotRunnable/TaskIsPausedException.php
./vendor/wpml/core-api/core/BackgroundTask/Exception/TaskIsNotRunnableException.php
./vendor/wpml/core-api/core/BackgroundTask/Command/PersistBackgroundTask.php
./vendor/wpml/core-api/core/BackgroundTask/Command/UpdateBackgroundTask.php
./vendor/wpml/core-api/core/BackgroundTask/Repository/BackgroundTaskRepository.php
./vendor/wpml/core-api/core/BackgroundTask/Service/BackgroundTaskService.php
./vendor/wpml/core-api/core/BackgroundTask/Model/BackgroundTask.php
./vendor/wpml/core-api/core/BackgroundTask/Model/TaskEndpointInterface.php
./vendor/composer/autoload_static.php
./vendor/composer/autoload_classmap.php
./sitepress.php
./classes/ATE/StatusBar.php
./classes/ATE/Loader.php
./classes/ATE/sitekey/Endpoint.php
./classes/ATE/sitekey/Sync.php
./classes/upgrade/commands/CreateBackgroundTaskTable.php
./classes/upgrade/class-wpml-upgrade-loader.php
./classes/settings/ProcessNewTranslatableFields.php
./classes/settings/CustomFieldChangeDetector.php
./classes/background-task/BackgroundTaskLoader.php
./classes/background-task/BackgroundTaskViewModel.php
./classes/background-task/AbstractTaskEndpoint.php

WordPress database error Table 'box_isid.isds_7_icl_background_task' doesn't exist for query SELECT * FROM isds_7_icl_background_task WHERE task_status IN ('1','0','2') AND 1=1 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\Core\BackgroundTask\Repository\BackgroundTaskRepository->getAllRunnableTasks, WPML\Core\BackgroundTask\Repository\BackgroundTaskRepository->getAllByTaskStatus

December 10, 2024 at 4:13 pm #16499578

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

Our workaround does not mention deleting the table; it specifies truncating it instead: WPML Errata - Backend Slowness and Duplicated Queries.

Did you delete the entry? If so, this behavior wihh the logs is expected. You can re-create it as viewable hidden link">here.

Best regards,
Marcel

December 10, 2024 at 4:52 pm #16499770

Daniel Dorado

yeah... i deleted the table, anyhow who does guarantee the plugin it's not going to create records who knows why and when? and suddenly put the sites down again because i've never used any kind of translation services, or set up any automated translations or so on... so the plugin itself did it and on a enterprise level these kind of bugs are not acceptable.

So until you provide me a solution to fully disable any kind of background processing from this plugin, for me it's safe to have that table deleted to fully disable the disaster this plugin is causing, because i saw support tickets from february 2024 and still the issue is happening...

December 18, 2024 at 5:13 pm #16527070

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

Our developers will work on optimizing this with the upcoming 4.7 release.

Best regards,
Marcel