Description
Image-optimization, SEO and store plugins schedule bursts of background work.
On modest hosting those bursts can fill every PHP-FPM worker at once and peg
the CPU. Real visitors then get 502 errors.
Load Governor reads the server’s actual load average with sys_getloadavg(). It
needs no shell access. When load is high, background work backs off:
- Above the warn threshold: Action Scheduler batches and concurrency shrink, and Heartbeat slows to every 120 seconds.
- Above the critical threshold: wp-cron defers everything except your always-run hooks, and no new Action Scheduler batches start.
Visitor page requests are never gated. Thresholds are set per CPU core, so one
setting works on any server size.
Heartbeat controls
Set the Heartbeat interval separately for the admin dashboard, the post editor
and the front end. Choose 30, 60 or 120 seconds, or disable it on the dashboard
and front end.
The post editor can be slowed but not disabled. It relies on Heartbeat for post
locking, which stops two people overwriting each other’s work.
If you use Heartbeat Control, which hasn’t been updated since 2023, Load Governor
covers the same settings. It also adds automatic slowing while the server is
under load.
Built to be safe
- Dry-run mode logs what would be gated without changing anything.
- Always-run hooks keep backup and security cron jobs running even under critical load.
- Fails open. On hosts that don’t report a load average, gating stays off and only your static Heartbeat settings apply.
- Nothing is dropped. Deferred cron jobs run on a later tick, and throttled Action Scheduler work resumes when load falls.
Installation
- Install and activate the plugin.
- Open Tools > Load Governor.
- Turn on Dry-run for a few days and watch the decision log.
- Add any backup or security cron hooks to Always-run, then turn Dry-run off.
FAQ
-
Does this slow down my visitors?
-
No. Gating applies only to wp-cron runs, Action Scheduler queue runs and the
Heartbeat interval. Normal page requests are never delayed. -
What if my host doesn’t expose a load average?
-
Load-based gating stays off and the status screen says so. Your fixed Heartbeat
settings still apply. -
Will deferred jobs be lost?
-
No. Deferred wp-cron jobs stay scheduled and run on a later spawn. Throttled
Action Scheduler batches resume once load drops. -
Which hooks should I add to Always-run?
-
Add your backup plugin’s scheduled hook and any security scan hooks. Tools such
as WP Crontrol list the hook names scheduled on your site. -
My site runs in a container. Is the core count right?
-
Load Governor counts cores from
/proc/cpuinfo, which shows the host’s cores. If
your container has a smaller CPU quota, set the CPU cores override to match it.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“EasyCloud Load Governor” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “EasyCloud Load Governor” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.1.2
- Change: the plugin is now named EasyCloud Load Governor. Settings and behaviour are unchanged.
1.1.1
- New: “Longest deferral” setting, 60 minutes by default. After wp-cron has waited that long, one run goes ahead in full even under critical load.
- Change: WordPress update checks for core, plugins and themes are now in the default always-run hooks.
1.1.0
- New: Heartbeat controls per location, with load-aware slowing.
- Fix: always-run hooks now run under critical load while other cron jobs wait. Before, every cron job was deferred.
- Change: the decision log records at most one entry per event type each minute.
1.0.0
- Initial release: wp-cron deferral and Action Scheduler throttling driven by per-core load, with dry-run mode, always-run allowlist, and a status and log screen.
