[wp-trac] [WordPress Trac] #17561: Multiple wp-cron processes hammering the server - do we need better semaphore locking?

WordPress Trac wp-trac at lists.automattic.com
Wed May 25 23:05:54 UTC 2011

#17561: Multiple wp-cron processes hammering the server - do we need better
semaphore locking?
 Reporter:  archon810     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Cron          |    Version:  3.1.2
 Severity:  normal        |   Keywords:
 This ticket is related to my quest of figuring out what is going wrong
 with my high-traffic server upon publishing - the load usually shoots up
 and all CPUs start spinning at 100%. I'm using super-cache and lots of
 other caching and optimizations, and at this point I'm trying to dig

 One thing I noticed during such spikes when everything slows down is
 multiple POST wp-cron.php?doing_wp_cron processes start showing up in the
 server-status list. I'm afraid that there is a race condition that only
 shows up on busy servers, which starts multiple (10+) wp-crons that all
 start doing the same thing.

 For example, due to bug #17560, it's possible that a single wp-cron has
 lots of useless but busy work to do. When somehow multiple cron jobs start
 running, they all do this work, making the already loaded situation even
 worse (load varies from 5-100, but doesn't seem to be directly corellated
 to the number of people on the site - I've seen higher load with 1/5 the
 amount of people before).

 Because the server has high-traffic, I'm considering adding an if
 statement that would only run cron 1 out of 100 times, but that's a dirty

 Please chime in, core devs. I'd love to hear your input. This has plagued
 Wordpress since before v3.

 Thank you.

Ticket URL: <http://core.trac.wordpress.org/ticket/17561>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list