Critical Performance Issue
-
Dear Support Team,
I am writing to report a critical performance issue with the Molongui Authorship plugin that severely impacts high-traffic WordPress sites using persistent Object Caching (Redis).
The Issue: The plugin appears to be triggering a
wp_update_userorupdate_user_metacall on the frontend for post authors/users on almost every page load. This results in the WordPress user cache being invalidated (clean_user_cache) and rebuilt instantly and repeatedly.This behavior causes “Cache Thrashing”:
- The user object is read from Redis (
GET). - The plugin updates a meta value in the database.
- This triggers a cache deletion (
DEL). - The cycle repeats immediately on the next request (or even within the same request).
On a site with high traffic, this floods the Redis server with
DELandSETcommands, causing CPU spikes and eventually crashing the Redis service due to memory exhaustion.Evidence: We monitored our Redis instance using
redis-cli monitor. When the Molongui Authorship plugin is active, we see a continuous loop of writing and deleting user cache keys (e.g.,users:{id}).Here is a snippet from our logs showing the behavior for a specific user ID (Author) within milliseconds:
[LOG SNIPPET START]
1771278917.059761 "DEL" "wp_prefix:users:79"
1771278917.060828 "GET" "wp_prefix:users:79"
1771278917.061443 "SET" "wp_prefix:users:79" ... [User object data]
1771278917.063053 "DEL" "wp_prefix:users:79"
1771278917.064479 "GET" "wp_prefix:users:79"
1771278917.065185 "SET" "wp_prefix:users:79" ... [User object data]
1771278917.066185 "DEL" "wp_prefix:users:79"
[LOG SNIPPET END]Confirmation: As soon as we disabled the Molongui Authorship plugin, the
DELcommands stopped immediately, the Redis connection stabilized, and the site performance returned to normal.Recommendation: Please investigate checking if
update_user_metais being called on frontend init hooks without proper checks (e.g., updating a “last seen” timestamp or similar data on every load). Database writes on frontend views should be avoided or handled via AJAX to prevent cache invalidation storms.Could you please look into this and provide a patch?
Best regards,
- The user object is read from Redis (
You must be logged in to reply to this topic.