Home›Support›English Support›[Resolved] URGENT! Abnormal Increasing Size of MySQL Binlog Files, when activate WPML plugins
[Resolved] URGENT! Abnormal Increasing Size of MySQL Binlog Files, when activate WPML plugins
This thread is resolved. Here is a description of the problem and solution.
Problem: The client reported that activating WPML plugins causes the MySQL binlog file to increase drastically in size, leading to very slow website performance and occasional inability to log into WP admin. Solution: We recommend updating the WPML plugins to the latest versions. Specifically, update WPML to version 4.6.12 and Strings Translation to 3.2.13. These updates address issues that might be causing the large binlog file. After updating, clear the debug.log to ensure that only new errors are logged. If you don't see the new versions available, please visit your WP admin's plugin installation page and click on the Check for updates button. You can find the plugin installation page here: Plugin Installation.
Please note that the preg_match() errors mentioned are not related to the issue of the MySQL binlog file.
If this solution does not resolve your issue or seems outdated, we highly recommend checking related known issues at Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML Support Forum.
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.
Background of the issue:
In recent weeks, I have noticed a very slow performance of the website. From time to time it is not even possible to log into WP admin. I found that the MySQL binlog file gets so big that it fills up all the space on the server. I figured out what causes such a big binlog file. I disabled all plugins and activated them one by one. At the same time, I measured the size of the binlog file. When I turned on the WPML plugins, the size started to increase drastically and is growing by the minute. As I write this, the size has increased by 10Mb. This is not normal as I don't have this problem on other websites.
Symptoms:
Abnormal increasing size of MySQL binlog files when WPML plugins are activated, leading to very slow website performance and occasional inability to log into WP admin.
Questions:
Why does activating WPML plugins cause the MySQL binlog file to increase drastically?
How can I prevent the MySQL binlog file from growing so large when using WPML plugins?
What steps can I take to resolve the slow performance and login issues caused by the large binlog file?
To enable it, open your wp-config.php file and look for:
define('WP_DEBUG', false);
Change it to:
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);
After this, repeat the action that caused the problem on your site—enable WPML to trigger the increase of the MySQL binlog file. In this case, the errors will be saved to a debug.log log file inside the /wp-content/ directory. Then, please share the errors with us.
Meanwhile, I'm also consulting our second-tier supporters about this issue.
There is no need for the procedures I asked you to check. Our second-tier supporter explains the following:
Binlog files record a log of every database activity that changes data (but not simply read data). So, they record actively "doing stuff," like saving translations, for example.
It may be possible to examine the log to detect problems, but the size of the file may just reflect the amount of work being done.
It is possible to make some edits to the MySQL configuration file to limit how long binlog files are retained and to limit the size of individual binlog files (once the size is reached, the server will start a new one), which seems like they would be useful in this context, e.g.
expire_logs_days = 7
max_binlog_size = 20M
I suspect very few clients ever need to use a binlog file (to recover data losses potentially), as they would be using a backup system for that.
Please let me know if you have any further questions.
problem still persist. I activated the writing of the WP log file and in 5 minutes the file size increased by 20Mb, in 15 minutes it increased to 53Mb (74100 lines). I had to stop writing the file because it would fill up space on the server again.
In the log, 99.99% of the line entries are the same, namely:
[14-Jul-2024 09:12:36 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/www/new.rimske-terme.si/wp -content/plugins/wpml-string-translation/classes/slug-translation/custom-types/wpml-st-slug-custom-type.php on line 69.
It means that the text entries in the log are written by the WPML String Translation plugin.
I'm sending a screenshot of the WP log file in the Attachment, because the file is 20Mb in size and I can't attach it.
We have new versions for WPML (4.6.12) and Strings Translation (3.2.13). The latest Strings Translation version should fix deprecated notices. Please update our plugins to the latest versions and check if the problem persists. Please clear the debug.log to check for only new errors. If you don't see we have new versions, please go to hidden link and click the Check for updates button.
Please note that the preg_match() errors are not related to your initial report about the MySQL binlog file.