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 – 15:00 8:00 – 15:00 8:00 – 15:00 8:00 – 15:00 8:00 – 15:00 -
- 16:00 – 17:00 16:00 – 17:00 16:00 – 17:00 16:00 – 17:00 16:00 – 17:00 -

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

Tagged: 

This topic contains 10 replies, has 2 voices.

Last updated by Alejandro 2 months, 2 weeks ago.

Assisted by: Alejandro.

Author Posts
September 30, 2024 at 11:51 am #16235958

Atiq Rahman

Background of the issue:
Using high CPU

Symptoms:

Questions:
Website getting Stuck After Active WPML. using 300%+ CPU

September 30, 2024 at 1:26 pm #16236406

Atiq Rahman

Any Updates?

October 1, 2024 at 7:18 am #16238671

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Hello!

- May i know if you're using a VPS or a shared hosting? and which one?
- The CPU unfortunately relies on the hosting resources for your specific installation and you have a site with many plugins + WooCommerce plugins which usually means that your site is usually making a lot of requests to the database.
When WPML is enabled, that will of course increase because each call needs to be checked for translations and it's likely that the increase is making a bottleneck (not because of the plugin but just because there are more queries).

If the server is not strong enough, then you'll notice slowness as well, which i guess you're also noticing, right?.

- We can start by installing the query monitor plugin (search by "query monitor" in the WordPress repository) and there please search by "duplicated queries, slow queries and queries by components)

- Then check the amount of queries in the front-end and in the back-end alongside the time it takes to load.

Send me that information and I'll happily check it out and try to understand what to do next.

October 1, 2024 at 8:45 am #16239068

Atiq Rahman

Hi,

I have seen after install query monitor there are maximum number of slow query and duplicates call from WPML. See from below.

│ Slow Pages │
├───────────────────────────────────────────────────────────┬─────────────┬──────────┬───────────────┤
│ URL │ OCCURRENCES │ MAX TIME │ AVG. DURATION │
├───────────────────────────────────────────────────────────┼─────────────┼──────────┼───────────────┤
│ /index.php?s=Iphone+12&post_type=product&product_cat= │ 2 │ 96.515s │ 93.531s │
│ /wp-admin/plugins.php?action=deactivate&plugin=sitepress- │ │ │ │
│ multilingual-cms%2Fsitepress.php&plugin_status=all&paged= │ 1 │ 57.338s │ 57.338s │
│ 1&s&_wpnonce=99acc0d4de │ │ │ │
│ /index.php?s=12+iphone&post_type=product&product_cat= │ 1 │ 43.858s │ 43.858s │
│ /wp-admin/plugins.php?action=delete-selected&checked[0]=o │ │ │ │
│ rder-import-export-for-woocommerce%2Forder-import-export- │ 1 │ 43.518s │ 43.518s │
│ for-woocommerce.php&plugin_status=all&paged=1&s&_wpnonce= │ │ │ │
│ 57cd7592c7 │ │ │ │
│ /index.php?filter_color=grey&filter_storage=128-gb,512-gb │ 1 │ 38.719s │ 38.719s │
│ /wp-login.php │ 1 │ 38.593s │ 38.593s │
│ /index.php?storecategory=1696 │ 9 │ 42.253s │ 35.753s │
│ /index.php?taxonomy=pa_weight&term=444gm │ 1 │ 32.124s │ 32.124s │
│ /wp-admin/plugins.php?plugin_status=all&paged=1&s │ 2 │ 29.070s │ 28.701s │
│ /wp-admin/plugins.php?action=activate&plugin=wp-rocket%2F │ │ │ │
│ wp-rocket.php&plugin_status=all&paged=1&s&_wpnonce=b0d3e6 │ 1 │ 26.783s │ 26.783s │
│ 2746 │ │ │ │
└───────────────────────────────────────────────────────────┴─────────────┴──────────┴───────────────┘
┌──────────────────────────────────────────────────────────────────────────────────────┐
│ Processes │
├────────┬────────────────────────────────────────────────┬────────┬────────┬──────────┤
│ PID │ NAME │ CPU │ MEMORY │ DURATION │
├────────┼────────────────────────────────────────────────┼────────┼────────┼──────────┤
│ 127395 │ php-fpm: pool jgcrfyduex │ 61.42% │ 4.02% │ 112.000s │
│ 127395 │ php-fpm: pool jgcrfyduex │ 40.54% │ 2.38% │ 110.000s │
│ 127395 │ php-fpm: pool jgcrfyduex │ 31.99% │ 4.10% │ 105.000s │
│ 127395 │ php-fpm: pool jgcrfyduex │ 39.12% │ 3.72% │ 64.000s │
│ 127395 │ php-fpm: pool jgcrfyduex │ 48.50% │ 3.72% │ 52.000s │
│ 127395 │ php-fpm: pool jgcrfyduex │ 40.98% │ 4.09% │ 51.000s │
│ 127395 │ php-fpm: pool jgcrfyduex │ 49.63% │ 3.89% │ 39.000s │
│ 134217 │ php /usr/local/bin/wp cron event run --due-now │ 50.26% │ 4.09% │ 12.000s │
└────────┴────────────────────────────────────────────────┴────────┴────────┴──────────┘
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ URL Durations │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬───────────────┬─────────────┤
│ URL │ AVG. DURATION │ OCCURRENCES │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────┼─────────────┤
│ /index.php?s=Iphone+12&post_type=product&product_cat= │ 93.531s │ 2 │
│ /wp-admin/plugins.php?action=delete-selected&checked[0]=order-import-export-for-woocommerce%2Forder-import-export-for- │ 43.518s │ 1 │
│ woocommerce.php&plugin_status=all&paged=1&s&_wpnonce=57cd7592c7 │ │ │
│ /index.php?filter_color=grey&filter_storage=128-gb,512-gb │ 38.719s │ 1 │
│ /index.php?storecategory=1696 │ 35.753s │ 9 │
│ /index.php?taxonomy=pa_weight&term=444gm │ 32.124s │ 1 │
│ /wp-admin/plugins.php?plugin_status=all&paged=1&s │ 28.701s │ 2 │
│ /wp-admin/plugins.php?action=deactivate&plugin=sitepress-multilingual-cms%2Fsitepress.php&plugin_status=all&paged=1&s& │ 28.677s │ 2 │
│ _wpnonce=99acc0d4de │ │ │
│ /wp-admin/plugins.php?action=activate&plugin=wp-rocket%2Fwp-rocket.php&plugin_status=all&paged=1&s&_wpnonce=b0d3e62746 │ 26.783s │ 1 │
│ /index.php?filter_operating-system=ios&filter_storage=128-gb&filter_color=grey │ 25.169s │ 1 │
│ /wp-admin/update.php?action=upgrade-plugin&plugin=dokan-pro%2Fdokan-pro.php&_wpnonce=bd1305b450 │ 23.595s │ 1 │

October 1, 2024 at 11:35 am #16240080

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

To investigate the issue, I kindly ask you to grant me access to the wp-admin area of your website.

I have enabled the necessary fields on my end so you can provide them to me in a secure and private manner. This way, only the two of us will be able to view them.

If possible and for your safety, i'd suggest you create a new user (a fake one with a fake mail) that you can later delete when the ticket is closed.

October 1, 2024 at 2:44 pm #16241272

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

I see the calls, some of them are from WPML or String translation and some of them do seem out of place (i'm asking our devs about it), however from the query time they should not be the one making the site slow or making he CPU go 100%.

Dokan is making slower calls (not slow overall but slower than WPML's) and many other plugin as well, they make less calls but considerably slower and i bet that WPML is intercepting them, making the matter worse.

Is this a live site or a development site? because I'd like to run a few tests but they require me to disable some plugins and maybe the theme.

If we can't do it here, I can try to create a staging site for you. let me know so i can understand how to continue.

October 2, 2024 at 7:12 am #16243481

Atiq Rahman

Hi,

This is a live site. wold you like to give you staging site ? if yes please sent again privet credential sending request i will share staging site credential.

thank you

October 2, 2024 at 7:39 am #16243667

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Thanks, a staging site would be better because we have to run many tests and some are not good to do on live sites.

I have enabled the credential fields again.

October 3, 2024 at 11:46 am #16249475

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Hello there!

May i know what plan are you using in cloudways? because from what i see the main reason why your site might be using a lot of the cpu is just because you have a quite heavy site without WPML so every plugin on top of it will only make things worse resource-wise.

you have 53 plugins, almost all of them are either elementor or WC related. if you remove even 2-3 extensions without removing WPML you'll see the same improvement as when you remove WPML.

Just so you know: Dokan + WC + WPML would require a server preferably with 2 cores and with an SSD. the ram and storage are not that important here more than the processing power.

you have less than 200queries on front or back-end and you are using more or less 250M of ram (you probably need like 300-400 which you do have available but not setup as WordPress memory, though).

200 queries is nothing knowing that you have very resource-intensive plugins (WC, Dokan, Elementor, WPML) which on its own are not a problem for any hosting, but together they start requiring a lot of resources.

On top of that i discovered that roughly 35% of the queries WPML are making is because OHER PLUGINS are requiring it!

Dokan makes like 5 calls to WPML, some WC extensions put together make more or less 10 more so out of 39 that come from WPML, 15 are being requested from other plugins (which means that without those plugins, there would be less queries from WPML as well).

You can have a visual explanation here: hidden link

I'd suggest that you ask cloudways if they can provide a testing server with the next plan you have and see if things improve.

October 4, 2024 at 10:43 am #16253543

Atiq Rahman

Hi,

I have already 4 core and 8GB RAM storage snapshot attached.

Basically when i see most of the SLOW query happens from Dokan and WPML.

if i disable dokan or WPML CPU working well.

Not sure it maybe still not comfortable with both plugin.

After update new version of Dokan getting more higher usage.

thank you

Screenshot 2024-10-04 at 2.40.18 PM.png
October 7, 2024 at 2:47 pm #16262349

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Yes, i tested many scenarios and if you disable any random plugin or a few of them, everything goes like twice as fast.

That's all pointing to the amount of resources you have. with a 4 core you should definitely not have these issues but as a next step, can you please talk to cloudways support and tell ask them the following:

You are experiencing a high CPU usage but you should have enough to handle it. your site is not making many queries to stress the server and a 4core Processor should be more than enough to handle the load.

At the same time you noticed that if you disable just a few plugins, whichever they are, the CPU goes to normal. at the same time you noticed that big plugins like WPML or Dokan, WooCommerce are of course part of the problem since they are heavy but is there a way they (cloudways) can give you more insights on why this is happening and where is it that the CPU is stressed more?

Then send me their answer to see if we can get to the bottom of this because the problem is not really with WPML or with a specific plugin, the problem is with the whole site, that for some reason is too heavy for the server (and it shouldn't, not with the amount of resources it seems to be using which is not that much at all)

The topic ‘[Closed] High CPU Using’ is closed to new replies.