[wp-trac] [WordPress Trac] #27091: Timeout to Wordpress API in update.php

WordPress Trac noreply at wordpress.org
Tue Feb 11 12:16:48 UTC 2014


#27091: Timeout to Wordpress API in update.php
----------------------------+-----------------------------
 Reporter:  dsevillano      |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Cron API        |    Version:  3.8.1
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 Hi,

 I was updating the plugins of my WordPress and I was getting all the time
 this error:

 {{{
 An unexpected error occurred. Something may be wrong with WordPress.org or
 this server's configuration.

 '''WordPress could not establish a secure connection to WordPress.org.
 Please contact your server administrator.'''

 /wp-includes/update.php on line 267
 }}}

 I went more deep and I have just found the problem is coming form the
 timeout to the call of WordPress API:

 http://api.wordpress.org/plugins/update-check/1.1/

 The timeout is hardcode, It is defined as 3 seconds and I can not override
 that configuration without modified the core of WordPress (something I
 don't want to do).

 /wp-includes/update.php on line 252
 {{{
                 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ?
 30 : 3)
 }}}

 If you follow the request across the code of Wordpress, It is going to the
 file:

 /wp-includes/class-http.php  on line 67

 In the function request you can see the defaults params for the request
 and the '''apply_filters''' but that configuration will be override from
 the hardcode I have already talk before.

 {{{
         'timeout' => apply_filters( 'http_request_timeout', 5),
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27091>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list