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.

Author Posts
May 2, 2017 at 8:26 am #1265965

alessandraB-3

Hello,
I'm experiencing a serious issue with WPML String Translation plugin.
The scenario is Worpress 4.7.4 with WooCommerce 3.0.5 and W3 TotalCache. All plugins, including WPML, are updated to the latest releases.
The site is working perfectly until I activate String Translation. The wp-admin immediately stucks, and the site begins to slow down, going in timeout after 60 seconds most of the times.
I already followed all the suggested troubleshooting seen in other threads (PHP memory, Track where string appear on the site, Adjust IDs for multilingual functionality, etc.), but nothing changes.
What I could see, on MySql side, is that activating the plugin causes tens of "SELECT DISTINCT" queries against the Db, most of which never end, pushing mysqld CPU usage to the limit. All relevant tables are already optimized, and predefined indexes are active.
Please guide me to further investigation.

May 3, 2017 at 11:17 am #1267051

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi ,

Thank you for contacting the WPML support. We are happy to help you.

Are you using shared hosting space or VPS?

I have a request. Please do the following steps after a site backup for the expected performance of your site.

1) Please upgrade your MySQL version to 5.6, the minimum required MySQL version for WPML. Check this article for more details -- https://wpml.org/home/minimum-requirements/

2) Increase *WP Memory Limit* to *256*(the minimum required memory limit for WPML is *128*). Please check the following link for more details

https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

3) Increase *MaxInputVars* of the PHP configuration settings to *5000* or more

It would be nice if you can provide me the WordPress debug.log (not WPML debug information). Please check this page for instructions https://wpml.org/documentation/support/debugging-wpml/

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

In this case, the errors will be saved to a debug.log log file inside the /wp-content/directory. Please replicate the steps and check you are getting any errors or warning related to WPML in the log file.

If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess in discussion).

--
With Regards

Bigul

May 8, 2017 at 8:47 pm #1271244

alessandraB-3

Hello Bigul, and thanks for your reply.
But it looks like I couldn't make myself clear. As I said in my first post, I already followed all the suggestions given in the tens of threads regarding very poor performance of string translation plugin, but the plugin is still literaly killing my site.
Anyway, to be more specific:
1) The DBMS is MariaDB 10.1;
2) WP_Memory_Limit is 256M;
3) MaxInputVars is 5000;
4) I enabled the debug log and NO, there's no error or warning related to WPML;

The issue is indeed related to db access, and particularly to the execution of tens of very performance-killing queries like this:

SELECT DISTINCT s.id,
s.name,
s.context,
st.status,
s.gettext_context,
st.value AS tra,
s.value AS orig
FROM wp_icl_string_pages sp
INNER JOIN wp_icl_string_urls su
ON su.id = sp.url_id
INNER JOIN wp_icl_strings s
ON s.id = sp.string_id
LEFT JOIN wp_icl_string_translations st
ON s.id=st.string_id
AND st.language=su.language
AND s.language!=su.language
WHERE (su.language='en' and su.url='(.?.+?)(?:/([0-9]+))?/?$') or (su.language='en' and su.url IS NULL)

that is SELECT DISTINCT queries joining tables with millions of rows (wp_icl_string_pages has 6170674 records in my case)

Unfortunately, at this point, disabling string translation is not an option, having WooCommerce Multilingual that requires it.
But this is a very serious issue, so please help me with a solution.

Regards

May 9, 2017 at 1:58 pm #1271830

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi ,

Thank you for the details. I have a request. Please consider a staging/test copy of your site in the same host. So we can do live testing in your real environment. Hope you are using a shared hosting space.

Please let me know your feedback.

--
With Regards

Bigul

The topic ‘[Closed] WPML String Translation kills performance’ is closed to new replies.