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 thread is resolved. Here is a description of the problem and solution.

Problem:

Performance issue happens with these symptoms: Translations sometimes are not saved to the database. CPU-Usage is up to 100%.

Solution:

The latest version of WooCommerce Multilingual (4.6.2) solved this issue. Please update WPML and its add-ons to their latest versions.

0% of people find this useful.

Author Posts
March 31, 2019 at 11:46 am #3501879

richS-2

Hello,
on our site the string translations are not being saved to the database. After saving it, it creates a duplicate of the previous string without the updated translations. Sometimes we have to save the translated strings multiple times before it's actually saved.
While working in WPML-Plugin the CPU-Usage goes up to 100% immediately.
This makes the whole Plugin unusable.
We are planning to go live with the site this week and we really need help!
The site:
hidden link

Best Regards
Rich Serra

April 1, 2019 at 7:48 am #3505047

Itamar
Supporter

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

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

Hi, Rich.

You wrote: "After saving it, it creates a duplicate of the previous string without the updated translations."
I'm not sure that I understand what happens when you save the string.
Could you please elaborate on this point?
Sometimes screen-shots illustrating what you mean may go a long way to clarify what words fail to transmit, so if you like, make use of “upload an image” below the comment area.

You wrote: "While working in WPML-Plugin the CPU-Usage goes up to 100% immediately."
Please read our following article 'Prevent performance issues with WPML' and make sure to implement the suggestions on this article.
https://wpml.org/faq/prevent-performance-issues-with-wpml/
By looking at the debug information of your site I can see that the option 'Track where strings appear on the site' in WPML -> String Translation is enabled on your site. Please disable it because this option is causing a load on the server's CPU. It is mentioned here.
https://wpml.org/faq/prevent-performance-issues-with-wpml/#3-deactivate-tracking-of-strings

Please follow the suggestion in the above article; they can improve the performance of your site and solve the issues that you have on it.

Regards,
Itamar.

April 1, 2019 at 10:39 am #3506395

richS-2

Hi Itamar,
thanks for your help.
I followed the instructions but unfortunately the issue isn't solved. When working in the backend the CPU usage is going up to 100%, also the Physical Memory Usage goes up to maximum (1GB).

Any idea what I can do?

For now we are not using any cashing plugins nore cashing via htaccess as we are still developing. But I gueis this shouldn't be cash related anyhow..

Regards
Rich

April 2, 2019 at 8:01 am #3514527

Itamar
Supporter

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

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

Hi, Rich.

1. Does the issue with strings saving persist?

2. Have you followed all the suggestions at the link that I had sent you?
https://wpml.org/faq/prevent-performance-issues-with-wpml/

Also, please be aware that performance is also affected by the hosting server and its capabilities. Usually, we get poor performance results in shared hosting environments. They are affected by the number of sites that are hosted on them and the hardware that they use.

3. Is your site hosted on a shared server plan?

4. Do you know and can share with me the hardware information of the server that your site is hosted on?

5. To properly debug this issue, could you please follow the suggestions at this link (How to Debug Performance Problems)?
https://wpml.org/faq/how-to-debug-performance-problems/
Here is what you need to do.
A. Check that the Xdebug extension of PHP is not enabled on your server.
B. Install the Debug Object plugin on your site (https://wordpress.org/plugins/debug-objects/)
C. Add this line to the wp-config.php file of your site.

define( 'SAVEQUERIES', TRUE );

D. Go to Tools -> Debug Objects and disable all of the options except DB Query.
E. Visit the page of your site (where you could see the performance problem) and repeat the action that causes it.
F. Check the debug output of this page.
G. Share the log with me.
For the detailed steps, please see the above link.

Thanks,
Itamar.

April 2, 2019 at 9:19 am #3515277

richS-2

Hi Itamar,

here is the info from debug objects:

DB Queries
https://pastebin.com/mjMQKKH4

Plugin DB Queries
https://pastebin.com/RZv7G0LQ

As far as I can tell it's a shared server (1&1).

PHP Version 7.1.27
memory_limit 512Mb
max_input_vars 10000 (local) 1000 (master) / increased via htaccess
WP_MEMORY_LIMIT 256Mb

Here's the server-info from cpanel:

Hosting Package undefined
Server Name stewie
cPanel Version 78.0 (build 12)
Apache Version 2.4.38
PHP Version 7.0.33
MySQL Version 10.1.38-MariaDB
Architecture x86_64
Operating System linux
Shared IP Address 69.162.134.115
Path to Sendmail /usr/sbin/sendmail
Path to Perl /usr/bin/perl
Perl Version 5.10.1
Kernel Version 3.10.0-962.3.2.lve1.5.24.3.el6h.x86_64

Thanks for your help
Rich

April 2, 2019 at 1:31 pm #3517721

Itamar
Supporter

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

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

Hi and thanks for sharing with me the needed information.

Judging by the information that you gave me so far it looks like you are exploiting your server / hosting package resources. This is also related to the other sites that you have on your shared hosting package. The memory_limit set on your server is 512Mb. For the site that is in question here, you allocate 256MB (WP_MEMORY_LIMIT 256Mb). The following error implies that indeed the memory is exploited because other sites might also use around 256MB.

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 266240 bytes) in /home/larchwoodcanada/staging.larchwoodcanada.com/wp-content/plugins/debug-objects/inc/class-db_query.php on line 207

Currently, I'm consulting our second tier supporters about your case and show them the DB Queries.

Meanwhile, to check if indeed we are looking here at a server issue and if needed to debug this issue further, I'm creating for you a space on our test server where you can migrate your site. In the following private message that I'll publish in a few minutes, you will have all the information on what you should do to migrate your site to our test server. When the migration is done, please access your site's copy on our server and check if the problem persists?

Thanks,
Itamar.

April 2, 2019 at 2:31 pm #3518313

richS-2

Hi Itamar,
thanks very much, the migration is ready now.

Best
Rich

April 2, 2019 at 5:48 pm #3519595

richS-2

Hi Itamar,
I thought this could be relevant info for you:
The site (staging.larchwoodcanada.com) is our development site while there's still the live site at larchwoodcanada.com on the same server. The live site is also a woocommerce shop and I think it's got the same memory limit of 256Mb like the dev site.
I'm the developer of the staging site with access to ftp and cpanel, but I dont know much more about the hosting package. I'm looking forward to get the site live within the next days.
Btw: will all this info be visible to other users? If so, please tell me so I can delete some of the confidential info.
Thanks
RIch

April 2, 2019 at 6:18 pm #3519849

richS-2

The site I migrated to your test server appears to be very very slow, in the front- and backend. Shop pages take ages to load, once they are being loaded the website becomes very fast. could be because of chrome caching, I don't know.

here's some info from query monitor plugin about slow queries :

startpage: https://pastebin.com/mLredY6A
startpage francais: https://pastebin.com/FTQNFN3U

shop page: https://pastebin.com/bE1UD6rR
shop page francais: https://pastebin.com/F4jCZz1v

best
rich

April 3, 2019 at 8:54 am #3523745

richS-2

Hi Itamar,
any news from your site about the performance issue?

Regards
Rich

April 3, 2019 at 10:19 am #3524471

Itamar
Supporter

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

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

Hi, Rich and thanks for migrating your site.

I'm going to check things now according to the suggestions from our second tier supporter.
I'll get back to you here when I'm done with the checking.

P.S. our forum is public but external links (outside wpml.org) are hidden and only you and I can see them. Please let me know if you have any information on this thread that you want me to remove.

Regards,
Itamar.

April 3, 2019 at 12:26 pm #3526061

Itamar
Supporter

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

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

Hi.

Our second tier supporter asked me to if the structure of the icl DB tables (WPML's tables) is broken. I could find that many of the icl tables are missing the Foreign keys field. I'm currently consulting our second tier supporter if that might be the issue with the site's performance. I'll get back to you here when I have more information about it.

Thank you for your patience.
Itamar.

April 3, 2019 at 12:30 pm #3526073

richS-2

Hi Itamar,
thanks very much for your work here.

Is there any way I can repair those tables?

I'll wait..

Regards
Rich

April 4, 2019 at 7:22 am #3532805

richS-2

Hi Itamar,
did you find out any more details about this performance issue.
Are the icl DB Tables indeed broken and can this be fixed?
Also the backend tells me there's a new WPML update and I'm not sure, if I should update it before this issue isn't solved.

Best
Rich

April 4, 2019 at 10:42 am #3534087

richS-2

*push*

Sorry for stressing but I really need help with my performance issues as we want to go live with our site.

Regards
Rich