Reported for: WPML Multilingual CMS 126.96.36.199
Resolved in: 3.2
Pages become unusable or very slow to load.
If you can monitor which queries are ran, you will find references to this one:
SELECT meta_key FROM wp_postmeta GROUP BY meta_key ORDER BY meta_key LIMIT 1000;
You need to make a small edit in one file of WPML.
You can use an FTP client to edit this file.
- Go to line 102, where you must see this line:
- Comment that line, by adding “//” at the beginning of it.
- Save the file
Once you do that, nothing is supposed to change (except the performances, which can considerably improve). There are no side-effects to this change. You are commenting out code which used to do something, but isn’t necessary any more.
We have noticed a peak of queries getting executed on both back-end and front-end. This only effects very very large sites with millions of postmeta entries (like we have on our sites).
This query comes from an old logic, which isn’t really doing anything important anymore. We’re removing it entirely in WPML 3.2.
If you notice a huge peak in loading pages, this may be your case.
However, please note that since WordPress 4.2 changed the charset to UTF8-bytes, many other plugins and the theme may show performance problems. This upgrade may change indexing (as has happened on our server) and may have unexpected interaction with MySQL (as we have experienced). This causes things that were very low-impact to suddenly become critical.
So, our advice is to enable the slow queries MySQL log and check which queries are really effecting your server’s performance.