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.

Tagged: 

This topic contains 12 replies, has 2 voices.

Last updated by Dražen Duvnjak 2 months, 1 week ago.

Assigned support staff: Dražen Duvnjak.

Author Posts
February 23, 2021 at 10:49 pm #8157851

jarrodT

I am having an issue with WPML string translation bloating my server and creating 100% database usage when updating, deactivating/activating, or deleting any plugins. The problem also occurs with theme and WP updates. Monitoring my database usage it will shoot up to 100% as soon as I try to initiate any of the above and will continuously 504 or 502 error the admin and front end of the site. This issue has always existed but has only gotten worse while adding more languages, products to woocommerce, etc...

I have also disabled wp_cron as everytime the site was visited wp_cron would spool up and look for theme / plugin updates and cause the issue to loop over and over.

I believe string translation is scanning plugin/theme/wordpress everytime a change is made and causing this issue repeatedly. Usually it takes about 30 mins to access the site again.

I have deselected the options:
- Make themes work multilingual
- Track where strings appear on the site
- Auto register strings for translation

If you check the attached images you can see wpml queries running when all I have done is deactivated a plugin. It seems that wpml is still performing some sort of automatic functionality somewhere that is loading up my database.

Screen-Shot-2021-02-23-at-2.38.30-PM.jpg
Screen Shot 2021-02-23 at 2.38.47 PM.png
February 24, 2021 at 12:25 am #8158301

jarrodT

Here is my debug.

[DELETED]

February 25, 2021 at 8:55 am #8170353

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello!

Welcome to WPML Support.

I'll do my best to help you solve this issue.

I have deleted your debug info since it should be shared in correct box, otherwise is unreadable to me.

I understand your issue, and would like you to follow the next steps in order to get a better idea of what is happening:

1) In order to expedite handling your support requests, can you please share WPML support debug information from your site in the debug box below.

More information on the link: https://wpml.org/faq/provide-debug-information-faster-support/

2) Create a staging site, if possible, it would be easier to do some testings and to check if it happens there as well.

3) Install Query monitor plugin (https://wordpress.org/plugins/query-monitor/)

4) Check load time and number of queries and slow queries in the top bar. Load time has "s" and queries "Q"

5) Disable all WPML plugins and check again.

6) Disable all other plugins and leave active only WPML plugins, switch to WP default theme. Check again.

This will tell us if the WPML is causing the issue and if it is happening in some specific combination of theme/plugins. Also which specific query is causing this issue and how long does it take to execute.

Please let me know how it goes and don't hesitate to ask if you find any problem along the way or have doubts or questions about the steps mentioned above, I'll do my best to help you in the best way possible.

Regards,
Drazen

February 26, 2021 at 2:31 am #8177373

jarrodT

I pasted the debug, I am currently migrating the site to a new host to test it on a different hosting platform. We can use that as the staging once it is ready. I will proceed with the troubleshooting you listed above.

February 26, 2021 at 7:14 am #8178651

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

That sounds like a good plan, please let me know when the staging site is ready and the results after following troubleshooting steps.

Thanks and kind regards,
Drazen

February 26, 2021 at 8:12 pm #8184217

jarrodT

I'm having issues getting a staging set up so I'll do the debugging on the live site.

Here is query monitor with WPML and all add-ons installed.

Screen Shot 2021-02-26 at 12.10.05 PM.png
Screen Shot 2021-02-26 at 12.08.59 PM.png
Screen Shot 2021-02-26 at 12.08.00 PM.png
February 26, 2021 at 8:26 pm #8184307

jarrodT

Here is all WPML plugins / add-ons disabled.

Screen Shot 2021-02-26 at 12.23.57 PM.png
February 26, 2021 at 9:44 pm #8184439

jarrodT

Here is the other results, 2nd is WPML and all plugins related to WPML add-ons active (so GravityForms + GFWPML, Woocommerce + WCWPML ) + default theme.

And 1st is resting with all plugins active + WPML with Uncode theme active.

Again, it only seems to act up and run slow + 504 timeouts whenever I'm in the admin doing tasks and especially when I add/remove/update plugins.

I am still trying to get the site in a staging environment, it's a bit tricky the DB is over 500MB and site files are almost 2GB. If you would like I could provide you with logins to the live environment for now.

Screen Shot 2021-02-26 at 1.34.08 PM.png
Screen Shot 2021-02-26 at 1.21.00 PM.png
March 1, 2021 at 7:25 am #8193677

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back and taking time to test.

Sure, let me have a look to get a better idea.

Please make a full backup of your site (files and database) and confirm it in your next reply. I might need to enable/disable plugins, switch themes and access your website database.

I would need to access both your site's wp-admin and FTP account. Be sure to provide both.

I have enabled the private username and password fields in your next reply.

I suggest you create a temporary user, set it as an administrator and then add those credentials in the private fields mentioned.

You can safely add your information into these fields.

Thanks,
Drazen

March 2, 2021 at 7:47 am #8204161

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

I have checked your staging site and I do not exactly see same the issue you described. I have tried activating/disabling plugins with and without WPML plugins. I get a database error, but afterward, I do not see specific WPML queries causing this. The issue happens also without WPML plugins.

1) Thing I see is PHP error from mapsvg, and random slow queries. It would show up WPML slow queries if the WPML is the culprit of the issue.

2) Issue happens for me also when WPML plugins disabled.

The SQL error message that I get and give us more info about the issue is:

PHP Warning mysqli_real_connect(): (HY000/1203): User mcpirdmy_home already has more than 'max_user_connections' active connections

This is quite a common issue that happens for strict MySQL rules.

The error message that you receive is because of limits on your server/hosting related to MySQL (the database server).

You can find more info by Googling it or read more here:

https://stackoverflow.com/questions/4079531/mysqli-error-user-already-has-more-than-max-user-connections-active-connectio

The error is at the server level and is related to the configuration of mySQLi which is not within the scope of influence of WPML. Plus error also happens also when WPML disabled.

I suggest contacting your system administrator or hosting provider in helping you fix that.

I hope I was helpful. Don't hesitate to ask if you find any problem along the way, I'll gladly help you.

Regards,
Drazen

March 2, 2021 at 5:29 pm #8211233

jarrodT

Hello Drazen, it appears switching hosts has made a huge impact on the performance of the site. I also see that the slow queries are not happening on this new environment so I believe we will be switching over completely to this new hosting. I will check out the MySQL issue separately.

March 2, 2021 at 6:50 pm #8211539

jarrodT

Actually, after typing that I went to log into the staging site and reactivating the WPML plugins and trying to update WPML crashed the SQL server. Other plugins updated just fine, as soon as it got to WPML usage shot up to 100% and crashed shortly after.

March 3, 2021 at 7:22 am #8213657

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back, those are good news.

Hope you will not have issues on new hosting.

As for the crash on the staging site, I am not sure what happened or how can I check, but I suggest checking always debug log when something like this happens. Also if you are using a lot of other plugins + WPML it requires a bit more resources / SQL connection and it could crash the server if resource-limited and other plugins were at the time using other connections/resources, but I can not tell more without investigation.

Let me know how it goes and if you still have issues and need me to check on them further.

Thanks and kind regards,
Drazen