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.

This topic contains 14 replies, has 2 voices.

Last updated by lauraN-2 1 year, 7 months ago.

Assigned support staff: Bobby.

Author Posts
January 10, 2019 at 3:07 pm #3076634

lauraN-2

We've gotten the following error in our PHP error log and would like your help to sort it out.

[Thu Jan 10 11:52:31.270808 2019] [lsapi:notice] [pid 642981:tid 140053430892288] [client 80.114.224.79:51226] [host storytiles.nl] Backend log: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM `st2_options` WHERE `option_name` = '_transient_wpml_st_upgrade_in_progress' made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, SitePress->init, do_action('wpml_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, wpml_tm_load, WPML_Translation_Management->load, do_action('wpml_tm_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_String_Translation->load, WPML_ST_Upgrade->run, WPML_ST_Upgrade->set_upgrade_completed, delete_transient, delete_option\n, referer: hidden link
[Thu Jan 10 11:52:40.014253 2019] [lsapi:notice] [pid 653142:tid 140053315503872] [client 64.185.235.234:52078] [host storytiles.nl] Backend log: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT INTO `st2_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_wpml_st_upgrade_in_progress', '1', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`) made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, SitePress->init, do_action('wpml_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, wpml_tm_load, WPML_Translation_Management->load, do_action('wpml_tm_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_String_Translation->load, WPML_ST_Upgrade->run, WPML_ST_Upgrade->run_front_end, WPML_ST_Upgrade->maybe_run, WPML_ST_Upgrade->set_upgrade_in_progress, set_transient, add_option\n
[

January 10, 2019 at 6:51 pm #3077779

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

if possible please upgrade WP version to the latest one as well with the WPML version and its add-ons

= > https://wpml.org/account/downloads

usually a deadlock is going to happen in most cases when two processes are conflicting and fighting over the same resources.

Please try the following.

1. Go to Theme and PLugins localization and select " Translate themes and plugins using only the WPML String Translation module (do not upload .mo files)" (this loads the .mo files once and thats it)

2. If the above does not resolve the issue try "disabling the String Translations" temporary and let me know your results

"Do not use the String Translation module to translate themes and plugins"

if step number #2 does work please following the steps in the following documentation and let me know your results

-=> https://wpml.org/errata/upgrading-from-a-beta-version-of-wpml-string-translation-2-6-0-to-the-formal-release-causes-the-mo-scanning-to-be-stuck/

January 15, 2019 at 10:25 am #3092100

lauraN-2

Hi Bobby,

I tried step 1 and it was ineffective. Step 2 is not an option I'm afraid. A big part of our website consists of string translations and we can't disable them long enough to see if the issue persists or not.

January 15, 2019 at 11:36 pm #3095014

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

We can migrate the site to our test server on CloudWays and test it there without affecting the live site , Or you can skip the test step and move directly to running the query found in the errata page as this could be causing the deadlock.

DELETE FROM wp_options
WHERE option_name = '_wpml_st_mo_scan_in_progress';

January 16, 2019 at 3:47 pm #3098387

lauraN-2

Hi Bobby,

We did as you said, but 0 rows were updated so I'm afraid it wasn't very effective.

Any further ideas?

January 16, 2019 at 8:45 pm #3099518

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

If possible i would like to take a closer look

does the error show up in the front end or backend at all ?

is there a particular step that triggers it ?

**Before we proceed I recommend to please take FULL BACKUP of your database and your website.**
I often use the Duplicator plugin for this purpose See: http://wordpress.org/plugins/duplicator/

I would like to request temporary access (wp-admin and FTP) to your site

You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you will enter is private which means only you and I can see and have access to it.

Thank you,
Bobby

January 17, 2019 at 11:57 pm #3104029

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for the access details !

if possible please verify the FTP details as i currently cannot login and examine the error log

January 18, 2019 at 1:39 pm #3106138

lauraN-2

I there, I hope you can look quickly... the site is extremely show due to the deadlocks!!

January 18, 2019 at 9:59 pm #3107379

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

thank you for the FTP details

i have added the following within your wp-config.php to generate a debug log

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . 'https://cdn.wpml.org/error_log.txt');

after examining the debug log i cannot see any deadlocks happening at the moment , are you able to see them in your server log ?

The thing with this deadlock is that we need to make sure that it is in a loop and that it keeps happening

if it happens once that is because two operations required the same key therefore the database throws an error to deadlock for one of the operations to release the key to be used by the other one , the issue here is if it keeps happening over and over

if that is the case we will need to escalate the ticket for further testing to our developers team that is why i need to make sure that the error is still happening , are you able to see it in the server log and its happened again or are you just seeing the error from January 10 ? if yes and its recent again please share it with me

NOTE : in the meantime i have also escalated this to our developers to take a closer look but being able to verify if the deadlocks keep happening would be detrimental

January 19, 2019 at 1:36 pm #3108161

lauraN-2

Example:
[client 93.95.144.168:53628] [host storytiles.nl] Backend log: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT INTO `st2_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_wpml_st_upgrade_in_progress', '1', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`) made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, SitePress->init, do_action('wpml_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, wpml_tm_load, WPML_Translation_Management->load, do_action('wpml_tm_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_String_Translation->load, WPML_ST_Upgrade->run, WPML_ST_Upgrade->run_front_end, WPML_ST_Upgrade->maybe_run, WPML_ST_Upgrade->set_upgrade_in_progress, set_transient, add_option\n, referer: hidden link
[Fri Jan 18 14:59:45.283826 2019]

January 21, 2019 at 7:47 pm #3113860

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you i am able to see the error generated now

we are currently looking into this and i will be updating you shortly

January 24, 2019 at 7:55 am #3123799

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

i have migrated your site on our Cloudways server to test , as our developers suggested that the issue might be resolved if 3rd party plugins were deactivated in order to let the update logic run without the deadlock happening.

i did a quick test on the staging server on cloudways as of course we couldnt test this on your live site.

first with all plugins activated , run a scan with String Translation to evoke the error and registered it on the error log.

afterwards i cleared the error log and did the same steps again but this time with all the LAURA LISA | plugins deactivated.

it has been a while now and i have checked the error log with no database errors logged , at this moment i will re activate these plugins and check to see if the database errors come back.

if not , deactivating temporary these plugins allows the logic to run, i will be updating you within a few hours to let the site log all the errors if any now.

January 24, 2019 at 3:45 pm #3125950

lauraN-2

Do you have an update?

January 24, 2019 at 5:02 pm #3126245

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

yes , i have checked the error log and i was not able to log any database deadlocks ever since i deactivated temporary the LAURA LISA | plugins and then reactivated them.

it seems that doing that did let the update logic to run

if possible please test that and let me know your results

January 25, 2019 at 12:37 pm #3128910

lauraN-2

Thank you, we will monitor the error log!