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 11 replies, has 2 voices.

Last updated by nguyenL-2 1 year, 11 months ago.

Assisted by: Eran Helzer.

Author Posts
June 30, 2023 at 4:25 pm #13925021

nguyenL-2

Hi WPML,

I have so many Duplicate Queries, is this make web site slowly? Sometime, may website 502 bad gateway or time out.

INSERT IGNORE INTO wp_options ( `option_name`, `option_value`, `autoload` )
VALUES ('wpml.WPML\\TM\\Settings\\ProcessNewTranslatableFields.lock', '1688141989', 'no') /* LOCK */

Thank you,
Nguyrn

CleanShot 2023-06-30 at 23.24.35@2x.png
July 2, 2023 at 4:47 pm #13929465

Eran Helzer
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I see you do have multiple Duplicate Queries.
However, I also see that at most, from the queries shown in the screenshot, they take 1.2 milliseconds, which is quite insignificant.

If you want to know the exact performance effect WPML has on your website, please try checking the "Page Generation Time" with WPML activated and deactivated. I have attached a screenshot showing how you can get that metric.

If there is a significant difference, there are steps you can take to improve this. Please check out our relevant documentation here:
https://wpml.org/tutorials/2022/03/boosting-the-performance-of-your-multilingual-wordpress-site/

Please update me on if this resolves your issue or you need any further help.

Screenshot from 2023-07-02 19-48-08.png
July 5, 2023 at 11:43 am #13949769

nguyenL-2

Hi Eran,

Duplicate Queries is WPML error right, how to solve this problem? I turn on WP Debugs there are too many error messages

[05-Jul-2023 11:16:57 UTC] 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', '1688555817', '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, QM_DB->query
CleanShot 2023-07-05 at 18.42.16@2x.png
CleanShot 2023-07-05 at 18.40.47@2x.jpg
July 5, 2023 at 12:39 pm #13950489

Eran Helzer
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

I understand you are seeing duplicate queries, but in order to know how to fix it I need to understand the issue.

Is this impacting your sites performance? If so, is it by a lot or not significant?
You can check that by checking page load time with and without WPML.

Is this causing 502 errors? If so, can you please direct me to the exact pages this is happening in?

I visited your site and did not experience any issues, performance or other.

I want to help, for that we need to first understand and isolate the issue you are experiencing.

July 11, 2023 at 3:59 am #14009883

nguyenL-2

Hi Eran,

You can see attached image, I think related to duplicate queries.

INSERT IGNORE INTO wp_options ( option_name, option_value, autoload )
VALUES ('wpml.WPML\\TM\\Settings\\ProcessNewTranslatableFields.lock', '1689047148', 'no') /* LOCK */

Thank you,
Nguyen

CleanShot 2023-07-11 at 10.50.13@2x.png
July 11, 2023 at 7:50 am #14010973

Eran Helzer
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Okay.

I understand you are saying this is a performance issue then. I would like to request admin access, in order to take a look for myself.

Please give me the exact pages where you are experiencing this slowness, so I can check them out.

I have set your next reply to be private so you can share credentials there.
Remember that it is always better to create a new admin user for me, then when we are done you can delete it.

July 11, 2023 at 4:32 pm #14017177

Eran Helzer
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Perfect, thank you.

Please also point out the exact problematic pages. If there is more than one, list them all.

July 11, 2023 at 4:56 pm #14017303

nguyenL-2

Hi Eran,

1. Large number of duplicate queries, is there any way to handle it?

2. As the image above, the MySQL wp_options Insert function makes the CPU/RAM increase and respond slowly when updating the article. I'm not reimagining the error, just that it happens sometimes.

Thank you,
Nguyen
P/s: My website uses a lot of Blocks using ACF

July 12, 2023 at 5:52 am #14018877

Eran Helzer
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Of course, I understand completely.

My meaning was that, if we want to escalate this to the 2nd tier, we need to be able to know how to reproduce the issue.

If there is no issue, or it is not reproducible, there is not much we can do.

My current conclusions:
- Page rendering is not slow (screenshots attached)
- Google’s PageSpeed Insights shows that you could improve your performance considerably by improving image handling on your site (hidden link)
- You currently are not using any caching plugin, which is very recommended
https://wpml.org/tutorials/2022/03/boosting-the-performance-of-your-multilingual-wordpress-site/

I want to help you.
If you are able, please implement these suggested fixes.
If you are able, please describe to me how to reproduce the issue you are facing.

Screenshot from 2023-07-12 08-24-23.png
Screenshot from 2023-07-12 08-25-07.png
Screenshot from 2023-07-12 08-26-46.png
July 14, 2023 at 4:22 am #14037093

nguyenL-2

Hi Eran,

Page rendering on the homepage is fine, but in the Dashboard the performance is quite slow.

As the main problem is duplicate queries is there any way to handle it? Sometimes duplicate queries go up to ~3000.

I have tried use redis, but it doesn't seem to be compatible often leading to Gateway Timeout.

Can you activate private reply, I will share credentials.

Thank you,
Nguyen

July 14, 2023 at 5:27 am #14037173

Eran Helzer
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Yes, please do.

Please make sure to have a working backup of your site before proceeding.

Your next reply will be private so you can share credentials there.
Remember that it is always better to create a new admin user for me, then when we are done you can delete it.

Also, let's make a Duplicator package of your site, it will be useful in case we need to escalate this to the 2nd tier.

July 14, 2023 at 7:21 am #14037633

nguyenL-2

Hi Eran,

After setting up the demo site, I discovered the problem was in the hardware incompatibility. It's very strange, but the slow performance no longer occurs.

Thank for your support!
Nguyen