Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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

Last updated by Diego Pereira 1 year, 1 month ago.

Assigned support staff: Diego Pereira.

Author Posts
December 19, 2018 at 2:15 am #3014371

davidA-29

The problem is explained in this video:
hidden link

When I access a site's admin dashboard, I see MySQL usage jump past 100% and it looks like WPML is the culprit. Calls such as the following litter the MySQL slow query log.

# Time: 2018-12-19T01:58:23.511199Z
# User@Host: thehost[thehost] @ localhost []  Id: 198233
# Query_time: 2.143553  Lock_time: 0.000095 Rows_sent: 1000  Rows_examined: 15341
SET timestamp=1545184703;
SELECT
				s.id,
				st.status,
				s.domain_name_context_md5 AS ctx ,
				st.value AS translated,
				st.mo_string AS mo_string,
				s.value AS original,
				s.gettext_context
			FROM wp_redacted_icl_strings s
			LEFT JOIN wp_redacted_icl_string_translations st
				ON s.id=st.string_id
					AND st.language='de'
					AND s.language!='de'
			WHERE s.context = 'woocommerce'
			 LIMIT 1000 OFFSET 4000;
# Time: 2018-12-19T01:58:25.845807Z
# User@Host: thehost[thehost] @ localhost []  Id: 198239
# Query_time: 2.396253  Lock_time: 0.000235 Rows_sent: 1000  Rows_examined: 15341
SET timestamp=1545184705;
SELECT
				s.id,
				st.status,
				s.domain_name_context_md5 AS ctx ,
				st.value AS translated,
				st.mo_string AS mo_string,
				s.value AS original,
				s.gettext_context
			FROM wp_redacted_icl_strings s
			LEFT JOIN wp_redacted_icl_string_translations st
				ON s.id=st.string_id
					AND st.language='de'
					AND s.language!='de'
			WHERE s.context = 'woocommerce'
			 LIMIT 1000 OFFSET 4000;

In that example, the same query is performed twice.

I cannot provide the debug info - I get 13 Request Entity Too Large error.

December 19, 2018 at 10:44 am #3015948

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @davida-29, welcome to the WPML support Forum!

Performance issues can be related to many variables, such as server type (shared, VPS, dedicated), CPU, memory, PHP version, theme, active plugins, etc.

Please take a look at this article to see how to optimize your website with WPML: https://wpml.org/2012/01/can-your-site-run-faster/

Here is some tips on how you can improve some points:
- Check if your server meet the minimum WPML/WordPress requirements
WPML: https://wpml.org/home/minimum-requirements/
WordPress: https://wordpress.org/about/requirements/

Also, disable the following settings:
- Adjust IDs for multilingual functionality (WPML > Languages)
- Track where strings appear (WPML > String translation)
- Auto register strings(WPML > String translation)

After these steps, teh issue still occurs?

To ensure the quickest and most accurate support, please provide your debug information so that I can get a look at some of your configurations. We have an excellent article on how to located here: https://wpml.org/faq/provide-debug-information-faster-support/.
NOTE: Please be sure to check the box to indicate you can provide debug info and paste your debug info in the debug field provided, and NOT in the general response field.

All the best,
Diego

December 19, 2018 at 8:15 pm #3018036

davidA-29

Hi. I have the three options that affect performance unselected.

Did you see the slow query log example? It shows WPML making the same query multiple times on one page load.

Further to that, see the following from my Apache error log - this shows WPML triggering 86+ errors as it attempts to query every site on my network (we have 150+ sites). I didn't capture the whole output, but this should be useful in showing the behaviour.

https://pastebin.com/e9SVd3nT

Why would an admin page load on site id 114 be querying _147_icl_translations, 119_icl_translations, 118_icl_translations and so on? No wonder it's slow.

December 20, 2018 at 4:07 pm #3021490

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

This may be related to the String Translator cache. Please try the following:
- Go to WPML > Support > Troubleshotting
- Click on Recreate ST DB Cache Files and wait for the "Done" alert
- Access some pages of the website. It should be a bit slow at first because the cache will be created again. But after that it should be faster

IMPORTANT: Please backup your site first before making any change, this is important for security reasons.

If the issue persist, just let us know and I will send you some instructions on how to duplicate the website on our servers, se we can take a look.

Kind regards,
Diego