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.

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by Bobby 1 year, 11 months ago.

Assisted by: Bobby.

Author Posts
July 14, 2023 at 10:40 am #14039281

brianJ-4

Hi,

There are thousands of duplicate queries being run, such as the example below.

Also, I had to disable this script or I could not use the admin:
sitepress-multilingual-cms/dist/js/ate-jobs-sync/app.js

Please let me know how I can stop all these queries and make the site usable.

Here is the debug information as it was to big to submit.

hidden link

Thanks.

SELECT autoload
FROM wp_options
WHERE option_name = 'wpml.WPML\\TM\\Settings\\ProcessNewTranslatableFields.lock' /* From [www.sunriver.org/wp-admin/post.php?post=32163&action=edit&lang=en&message=1] in [/nas/content/live/sunriver1/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/core-api/core/utility/Lock.php:80] */ 1,602 0.4425

1,602 calls
delete_option
1,602 calls
DELETE
FROM wp_options
WHERE option_name = 'wpml.WPML\\TM\\Settings\\ProcessNewTranslatableFields.lock' /* From [www.sunriver.org/wp-admin/post.php?post=32163&action=edit&lang=en&message=1] in [/nas/content/live/sunriver1/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/core-api/core/utility/Lock.php:80] */ 1,602 2.6651

1,602 calls
delete_option
1,602 calls
UPDATE wp_options
SET option_value = '1689330882'
WHERE option_name = 'wpml.WPML\\TM\\Settings\\ProcessNewTranslatableFields.lock' /* From [www.sunriver.org/wp-admin/post.php?post=32163&action=edit&lang=en&message=1] in [/nas/content/live/sunriver1/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/core-api/core/utility/Lock.php:69] */ 4 0.0059

4 calls
update_option
4 calls
INSERT IGNORE INTO wp_options ( option_name, option_value, autoload )
VALUES ('wpml.WPML\\TM\\Settings\\ProcessNewTranslatableFields.lock', '1689330883', 'no') /* LOCK */ /* From [www.sunriver.org/wp-admin/post.php?post=32163&action=edit&lang=en&message=1] in [/nas/content/live/sunriver1/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/core-api/core/utility/Lock.php:47] */ 231 0.3574

231 calls
WPML\Utilities\Lock->create
231 calls

July 14, 2023 at 7:26 pm #14041335

Bobby
WPML Supporter since 04/2015

Languages: English (English )

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

Hi there.

Please review my colleague's reply in the following thread breaks down the reasoning behind these queries.

https://wpml.org/forums/topic/latest-wpml-version-issuing-multiple-db-locks/#post-13387739

Can you verify with me if you are using the automatic translation?

Also, please provide your WPML Debug information in the debug field below. http://wpml.org/faq/provide-debug-information-faster-support/

July 14, 2023 at 8:23 pm #14041415

brianJ-4

Here is a link to the debug information:
hidden link

It is 8mb in size so it does not fit in the box above.

I am still having issues and that other issue was no helpful.

I am trying to reload the admin and it consistently has between 6k and 12k of duplicate queries per load.

July 17, 2023 at 7:31 pm #14053255

Bobby
WPML Supporter since 04/2015

Languages: English (English )

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

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

July 20, 2023 at 7:27 am #14069569

Bobby
WPML Supporter since 04/2015

Languages: English (English )

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

Thank you for the access details! I was able to reproduce this behavior on your staging environment using a minimal setup, however, I was not able to reproduce it on a fresh sandbox environment.

I am currently still testing this and will be escalating to our second tier to further review.

Before doing so could you also please confirm with me if you used before the automatic translation feature?

July 20, 2023 at 2:59 pm #14073589

brianJ-4

I do not think it was intended to use the automatic translation feature. It started producing this error in Feburary/March with that release.

July 20, 2023 at 5:56 pm #14074693

Bobby
WPML Supporter since 04/2015

Languages: English (English )

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

I believe this is why there are so many queries, some jobs must be stuck. I will consult with our team and update you with any feedback here.

July 21, 2023 at 6:00 pm #14081673

Bobby
WPML Supporter since 04/2015

Languages: English (English )

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

After discussing this with our team I can say that this is caused by certain tasks that are stuck and the system is trying to execute. When using the Classic Translation Editor they willl not be executed.

A quick workaround and fix would be to clean and remove any entries in the icl_background_task table in the database.

-- NOTE: Please make sure to have a full backup in place before doing this.

OR
Make sure that cron works
Enable Advanced Translation Editor if not enabled as an editor (it is not) and this will allow the tasks to finish.

Our team is currently working on a permanent fix but at the moment you can this workaround.

July 21, 2023 at 8:45 pm #14082119

brianJ-4

Great thanks.

I tested that on staging and it resolved the issue.

I am going to make a backup and try it on the production site on Monday.

I will update the ticket once that works on Monday.

Cheers

July 21, 2023 at 9:08 pm #14082143

Bobby
WPML Supporter since 04/2015

Languages: English (English )

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

Great! Thank you for confirming

July 27, 2023 at 11:24 pm #14114085

brianJ-4

I cleared out the table on production today after I backed it up.

And it resolved the problem and everything is loading again.

Thanks for your help in narrowing it down!