Killed the :00 load spike by staggering cron
Just did this on a $6 box running 15 sites. Every wp-cron and backup fired at the top of the hour, load avg hit 9.0 for ~90 seconds, sites timing out.
Moved real crons off wp-cron and spread them:
— disabled wp-cron, added per-site system cron at odd minutes (7,23,41 * * * *)
— backups jittered with sleep $((RANDOM \% 300)) at the top of the job
Peak load avg fell from 9.0 to 2.1. No more clustered timeouts. The jitter one-liner alone flattened the backup pileup.
Try it tonight.
Root Access Daily
@RootAccessDaily
Killed the :00 load spike by staggering cron
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.