Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I turned on debug mode in WordPress and the first request of the day I get this error:

Warning: http_request() [function.http-request]: Timeout was reached; Operation timed out after 1000 milliseconds with 0 bytes received (/wp-cron.php?doing_wp_cron) in /public/wp-includes/class-http.php on line 1218

I know what cron jobs are and I understand how WordPress might want to run periodic jobs (and since HTTP is stateless, running a "cron" job on the first request of the day makes sense) but why does it time out?

share|improve this question
    
My first guess would be to check to make sure wp-cron.php is on your server. Every time I upload WordPress, it times out in the transfer and I have to copy it over manually ... –  EAMann Aug 13 '10 at 15:01
    
Where are you hosting? Sometimes hosts turn off HTTP callbacks. –  MikeSchinkel Aug 13 '10 at 16:38
    
It looks like wp-cron.php is in the root and I'd rather not say who the host is! I'll look though the faq and see if there is anything in there about HTTP callbacks. –  tooshel Aug 13 '10 at 23:33
    
There was nothing about HTTP callbacks (or wp-cron.php) in the faq just info about how they don't support cron jobs (which is why something like this exists in PHP, right?) –  tooshel Aug 13 '10 at 23:39
add comment

1 Answer

up vote 7 down vote accepted

It's a bug: http://core.trac.wordpress.org/ticket/11831

share|improve this answer
    
Lots of discussion on that link but it does describe the problem. Thanks! –  tooshel Aug 22 '10 at 20:53
    
I just ran into this same problem and found your answer. Thanks! @holizz. –  MikeSchinkel Aug 27 '10 at 5:16
    
For me it helps to repeat the request by clicking refresh. I only get the error message from time to time in my development environment. –  hakre Sep 8 '10 at 18:40
    
@hakre: Once wp-cron has been requested, it isn't requested again for a certain period of time. Therefore, when you see the warning, you won't see it again for a short while. Also, the request frequently succeeds and thus doesn't cause a warning. Those two factors combine to make it only happen once in a while. –  holizz Sep 8 '10 at 22:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.