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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Long Nguyen 1 year, 1 month ago.

Assisted by: Long Nguyen.

Author Posts
November 7, 2023 at 11:07 am #14746493

Philip

Dear Support Team,
We are trying to optimize the performance of our website and are examining the logs for possible problems or errors and have found two errors that we would like to address to you. Can you give us any recommendations about the causes of these errors or how to fix them properly?

This is the first one:

[Mon Nov 06 09:31:40.655564 2023] [-:error] [pid 42244:tid 34394012928] [client 46.140.39.34:55145] FastCGI: server "/var/run/hcgi/7235" stderr: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT IGNORE INTO wp_options ( `option_name`, `option_value`, `autoload` ) VALUES ('wpml.WPML\\\\TM\\\\Settings\\\\ProcessNewTranslatableFields.lock', '1699259500', '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, referer <em><u>hidden link</u></em>

This is the second:

Mon Nov 06 19:51:13.110230 2023] [-:error] [pid 42244:tid 34430109440] [client 134.249.137.24:59428] FastCGI: server "/var/run/hcgi/7621" stderr: PHP Fatal error:  Out of memory (allocated 3748519936) (tried to allocate 262144 bytes) in /home/itvogel1/www/vogelwarte.ch/wp-content/plugins/wpml-string-translation/inc/gettext/wpml-string-scanner.class.php on line 204, referer <em><u>hidden link</u></em>
November 9, 2023 at 5:20 am #14762121

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Philip,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

The first one, this error might happen when you change the translation preference of a/some custom fields and WPML attempts to apply the change to all related posts/pages where the custom fields are associated. You can see a gear icon at the topbar menu in admin area.
The batch processes require time to complete and are browser-based, not server-based. So if you (wp users) navigate away before the processes are complete WPML will keep re-starting. I suggest you check with your main user and make sure the process is finished, once it does it should all go back to normal.
If the error persists or the process takes too long to complete, please let me know.

The second one, this error related to the lack of WP memory on your site. You can increase it by adding the following code in your wp-config.php file, right before the /* That’s all, stop editing! Happy publishing. */ line:

define( 'WP_MEMORY_LIMIT', '512M' );

After adding the code you can confirm that the memory was changed correctly from WPML > Support > WordPress > Memory limit. Please check this link for more details
https://wpml.org/home/minimum-requirements/.

Look forward to your reply.
Thanks

Screenshot 2023-11-09 at 12.14.24.png
November 9, 2023 at 11:29 am #14765537

Philip

Hi Long Nguyen,

Thank you for your time and for your help.

We've adjusted memory limit and set it to 512Mb as you suggested.

As for the first issue - it's still reproduced in log when a post is simply re-saved by one user.

Today also I noticed a new problem in log which is also strange and we believe may affect website performance:

FastCGI: server "/var/run/hcgi/8271" stderr: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT IGNORE INTO wp_options ( `option_name`, `option_value`, `autoload` ) VALUES ('wpml.WPML\\\\TM\\\\Settings\\\\ProcessNewTranslatableFields.lock', '1699460331', '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, referer

If you have recommendations on how to avoid this or thoughts on how to fix this error, please let me know.

November 10, 2023 at 2:23 am #14771917

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Please try to enable a minimal environment as below and re-save a post again to see if it helps:
- Deactivate all non-WPML plugins.
- Switch to a standard theme of WordPress.
❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/

If it does not help, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info.

✙ I would need your permission to de-activate and re-activate Plugins and the Theme to change configurations on the site if needed. This is also a reason the backup is critical.

Look forward to your reply.
Thanks

November 11, 2023 at 9:40 pm #14783009

Philip

Hi,

Thanks for your message.

We'll try to run some DEV environment and check there with steps you recommended but we are in a bad situation with our production website right now.

After the post editing backend became unresponsive again, the error log console full of these entries:

FastCGI: server "/var/run/hcgi/872" stderr: eate, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WPML\\Utilities\\Lock->create, WP
FastCGI: server "/var/run/hcgi/891" stderr: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT IGNORE INTO wp_options ( `option_name`, `option_value`, `autoload` ) VALUES ('wpml.WPML\\\\TM\\\\Settings\\\\ProcessNewTranslatableFields.lock', '1699720280', '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, referer <em><u>hidden link</u></em>
FastCGI: server "/var/run/hcgi/891" stderr: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT IGNORE INTO wp_options ( `option_name`, `option_value`, `autoload` ) VALUES ('wpml.WPML\\\\TM\\\\Settings\\\\ProcessNewTranslatableFields.lock', '1699720281', '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, referer <em><u>hidden link</u></em>
FastCGI: server "/var/run/hcgi/891" stderr: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT IGNORE INTO wp_options ( `option_name`, `option_value`, `autoload` ) VALUES ('wpml.WPML\\\\TM\\\\Settings\\\\ProcessNewTranslatableFields.lock', '1699720282', '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, referer <em><u>hidden link</u></em>
November 13, 2023 at 2:30 am #14785211

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Please try the minimal environment as I suggested above. If it doesn't help, please share your staging site credentials (wp-admin and FTP), I will take a look. Your next reply is set to private to share the info.

Look forward to your reply.
Thanks

November 15, 2023 at 4:18 am #14803791

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

There is a similar issue that you can find here https://wpml.org/forums/topic/database-lock-slow-mysql-queries/

The workaround is to delete entries in the table wp_icl_background_task. Please try this and let me know how it goes.

Look forward to your reply.
Thanks

November 15, 2023 at 8:03 am #14805001

Philip

Hi,

Thanks for the link although it is a private and I can not access it. But I understood the idea of suggestion there.

Thank you for recommendations, we will try them asap and I get back to you with the results.

Have a nice day,

November 15, 2023 at 8:33 am #14805443

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

I'm waiting for your feedback.

Thanks.

The topic ‘[Closed] Deadlock errors in website logs’ is closed to new replies.