Hello, my hosting provider's (Cloudways) slow-request log shows that "mark all read" requests are consuming very large amounts of PHP execution time. Multiple foro=allread URLs are averaging 15–22 seconds, with peaks of 30 seconds, each occupying a PHP-FPM worker for the full duration. On my server (2 vCPU), a few concurrent requests of this type saturate the worker pool and spike CPU.
This is a problem in two ways: automated crawlers hitting these URLs cause load spikes, but even a legitimate logged-in member clicking "mark all read" would wait 15–30 seconds for the action to complete. Please check this image https://ibb.co/0jpwdLnS
Could you advise:
- What does
foro=allreaddo internally that could take this long? Is it iterating over all topics across all forums per request? - Are there settings to limit its scope, or is this a known performance issue with a fix or workaround?
- Is this improved in a newer wpForo version?
My environment, for reference: wpForo v3.1.2 , WordPress on Cloudways (NGINX/PHP-FPM Lightning stack), Elasticsearch via ElasticPress, Redis object cache, Cloudflare Enterprise in front.
Thank you — happy to provide logs, screenshots, or temporary access for either issue.
Warm regards,
Sarmad
paradigmshift.com.pk
Thanks — this points clearly at the read-tracking queries. Rather than me manually altering your plugin's database tables (which would be overwritten on updates and risks your schema), can you confirm: (1) Do wpForo's read-tracking tables have proper composite indexes on user_id / topic / timestamp in the current version? (2) Is the slow 'mark all read' something you can address in the plugin — either by adding the needed indexes in a future release, or by making the operation asynchronous as you suggested in step 4? This affects every wpForo site at scale, not just mine, so a plugin-level fix seems more appropriate than per-site database surgery.