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.

Our next available supporter will start replying to tickets in about 2.20 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 23 replies, has 2 voices.

Last updated by Bruno Kos 2 years ago.

Assisted by: Bruno Kos.

Author Posts
March 14, 2022 at 7:34 pm #10787603

tomasA-11

Swedish is the "original" language, and then we translate to 3 other languages. It's a webshop with over 50.000 products and over 15.000 categories.
When I surf on the Swedish (original) webshop the performance is "ok", not good but one can live with that. But when I go to the other languages, and is logged in as admin there is a problem.
One EVERY page load the function maybe_populate_cache in class-wpml-element-translation.php does a sql query on EVERY product category.

So, over 15.000 queries every page load....

This does not happen when I am not logged in as admin.
But, we need to be able to work with the web shop logged in as well....

March 15, 2022 at 2:25 pm #10794151

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I see that Laura suggested a test in a minimal setup.

If the issue is visible even then, can you install this plugin https://wordpress.org/plugins/query-monitor/ - and measure performance with and without WPML and send us screenshots/results?

Regards,
Bruno Kos

March 17, 2022 at 8:59 am #10809883

tomasA-11

Hi Thanks Laura and Bruno.
Yes, I am always using query monitor in my projects....
I have now found the problem, it was a plugin called Unifaun (nShift) that was the problem. I managed to rewrite at bit of their code and it dit it.

I have another performance problem now.
It's when I am saving a product... It takes so much time that it times out and the product is not saved. I tried to remove all 15000 categories and then it works fine to save a product. And also without WPML saving a product works fine....

So I guess that WPML for some reason loads all product categories (and maybe on all languages, that is 15000 * 4 in our case) when saving a product. Is this a way to disable this strange behavior?

March 17, 2022 at 1:32 pm #10812817

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I assume that this saving is slow when saving a product translation, or does it happen on original also, so when trying to save it but with WPML active?

Can you tell me if you are using ACF perhaps? Because several days ago we had this case:
https://wpml.org/de/forums/topic/wpml-und-acf-beitrag-speichern-dauert-zu-lange/#post-10741529

if not the same case, then we should debug your case through our 2nd tier, I can send you all the details. Let me know about the above first though!

Regards,
Bruno Kos

March 17, 2022 at 3:27 pm #10813913

tomasA-11

It's slow saving the original product as well.

Yes, we also have ACF.

But, since i tried to remove the product categories, and then it works fine I think it have to do with the amount of categories.....

March 18, 2022 at 9:18 am #10819539

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Can I ask you the following? In order to debug this issue, I will install Duplicator plugin, will create packages and will try this on my localhost and escalate further to 2nd tier.

I will exclude all the media files, etc, to keep the package minimal.

https://wpml.org/faq/provide-supporters-copy-site/

Let me know if this is OK with you.

If yes, I will need WordPress admin username and password so I could do this. I marked your next reply private so you can safely add this information.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Also make sure to:
- have that site with low performance ready, so all the categories in place
- tell me exact url where I can see the issue happening

Regards,
Bruno Kos

March 18, 2022 at 9:54 am #10819873

tomasA-11

Are you sure?
The site is about 179 gb compressed....

March 18, 2022 at 10:21 am #10819993

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I will exclude all the media files, etc, to keep the package minimal.

I guess database doesn't have like 5 or 10 gb or more?

There is no other way - our 2nd tier will have to deploy the site on their own and will use their debugging tools.

March 22, 2022 at 6:02 pm #10850449

tomasA-11

Hi Bruno, sorry for a slow answer.
To make sure about the errors I cleaned up the database and worked on that a bit.
I wanted to make sure that this was ok.
And then I did some testing on my own.

Now I have found the issue with adding a product.
It is a conflicting plugin, it's WooCommerce Product Add-ons
As soon that this plugin is activated memory get full and craches the site.
We have loads of memory 756 MB PHP memory, 20480M wordpress memory, so it have to be this plugins that is the problem.

When saving an existing product, this problems does not occur.
I have attached an image on the debug.log when adding a product and having the plugin active.

We really need that plugin, we're working a lot with it... Is there maybe a work around here?

debug log.PNG
March 23, 2022 at 7:30 am #10853701

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

So the above issue occurs only in combination with WPML, so site works with WooCommerce Product Add-ons until you enable WPML?

I find no such reports in our database so the only way to solve it is to debug it, but for that we need a Duplicator package.

Regards,
Bruno Kos

March 24, 2022 at 12:51 pm #10867625

tomasA-11

Hi, now I have created a backup.
To make it possible because the site is big I had to download the files and the make three zips of of them.
I have one zip for database, one for source code and one for uploads.
How do I send URL:s for you to download?
Or maybe I can give you FTP ?

March 24, 2022 at 1:01 pm #10867699

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

This is why I suggested I create a Duplicator package - let me know if this would still be an option for you. We never need e.g. media files, Duplicator allows exclusion for almost everything that is not need and much easier deployments for us.

So this:
https://wpml.org/forums/topic/performance-issues/#post-10819539

Regards,
Bruno Kos

March 24, 2022 at 1:05 pm #10867709

tomasA-11

Ok I have already created those files...
But if really want Duplicator I can do that.

March 24, 2022 at 1:41 pm #10868137

tomasA-11

I guess since the site is big, it's not possible with duplicator...
So where should I send the links to the zip:s I have cerated?

dup.PNG
March 24, 2022 at 1:50 pm #10868257

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Please create a Duplicator and make sure to exclude media files.

It helps us quite a lot during deployment, especially during urls conversions, etc.

I can download Duplicator and Installer directly using FTP from any location that is most convenient for you.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.