Outdated transients are not cleared from database with memcache object cache
-
Versions: WordPress: 6.7.2, W3TC plugin: 2.8.6.
Relevant plugin settings: Memcache backend, object cache enabled, option “Store transients in database” enabled.
After the recent plugin update, I was facing php out of memory expections (up to 1.6GB per php fpm process) in combination with a tremendous slow down of php request processing at increased CPU load. I figured out that 200M+ of autoload transients were present in some WordPress instances, which explains the peak of memory consumption and slow php processing. I had suspected the plugin
wp-typography
as its cache stored as transient was one of the largest ones (please refer here to the topic). After deleting all outdated transients (expect the newest one) from this plugin, I recognized another 175 new ones (61MB) after just 9hrs.List of recent transient options from the same plugin (all of them autoload!!!):
_transient_typo_1740565127_php_hyphenator_cache
+476 secs._transient_typo_1740564651_php_hyphenator_cache
+195 secs._transient_typo_1740564456_php_hyphenator_cache
+189 secs._transient_typo_1740564267_php_hyphenator_cache
+216 secs._transient_typo_1740564051_php_hyphenator_cache
+256 secs._transient_typo_1740563795_php_hyphenator_cache
I suspect the transients are automatically stored by W3TC as backup due to enabled option “Store transients in database”. However, I cannot see why outdated transients are not automatically removed. Even issuing
wp w3tc flush object
does not change the list of transients in the database.Expected behaviour: Once the object cache is updated (for whatever reason), outdated transients in the database are removed either directly or async. via WP cron. When adding new transients to database, older versions should not marked as autoload.
Thanks for your help!
- You must be logged in to reply to this topic.