[wp-trac] [WordPress Trac] #9318: wp_reschedule_event peggs CPU
when very old timestamp is passed in as argument
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 11 18:51:39 GMT 2009
#9318: wp_reschedule_event peggs CPU when very old timestamp is passed in as
argument
----------------------------+-----------------------------------------------
Reporter: natethelen | Owner: anonymous
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Administration | Version: 2.7
Severity: major | Keywords: wp-cron wp_reschedule_event
----------------------------+-----------------------------------------------
Somehow a wp-cron timestamp got create/set with a very old timestamp of
1070. I am sure there is a bug elsewhere that caused this but now that it
has happened, WordPress does not recover very gracefully. The result is
that when wp_reschedule_event is called, the CPU pegs as it tries to
increment it by the $interval until eventually it times out. This causes
wp-crop to fail from then on. A possible solution is to set it to time()
+ $interval instead of incrementing. Or only increment if $timestamp <
time() - (2 * $interval).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9318>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list