[wp-trac] [WordPress Trac] #57315: Increase HTTP timeout for Theme listing/downloads

WordPress Trac noreply at wordpress.org
Mon Dec 12 04:20:37 UTC 2022


#57315: Increase HTTP timeout for Theme listing/downloads
-------------------------+-----------------------------
 Reporter:  ahortin      |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Themes       |    Version:  6.1.1
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 I just encountered an issue when trying to go to the “Add New” Theme
 screen in the Dashboard on my local development sites.

 ''An unexpected error occurred. Something may be wrong with WordPress.org
 or this server’s configuration. If you continue to have problems, please
 try the support forums.''


 [[Image(https://i.imgur.com/1pOA7Wf.png)]]

 - I tried different sites with different WP versions, and all had the same
 issue.
 - I tried different browsers. Firefox (my default) and also Brave.
 - I tried starting Firefox in Troubleshoot mode (i.e. doesn’t load any
 browser add-ons)
 - I tried disabling my (Bitdefender) Anti-virus.
 - There’s no errors showing in the Console or Network tab in the browser
 Tools, but using the ''Log HTTP Requests'' plugin I can see that the API
 call is returning the following error:

 ''http_request_failed: cURL error 28: Resolving timed out after 5000
 milliseconds''

 If I go to the Add New Plugin screen, it works fine. I was just having
 having an issue on the Add New Theme screen.

 After a number of different suggestions, @dd32 helpfully suggested adding
 the following filter which did resolve the issue:

 {{{add_filter( 'http_request_timeout', function() { return 30; } );}}}

 According to @peterwilsoncc, requests to download a Plugin set the timeout
 to 15 seconds, but Theme downloads do not set a timeout so it's most
 likely defaulting to 5 seconds.

 I'm guessing this is the same for listing themes as well. As mentioned
 above, I didn't have any issue when listing plugins.

 Could the API Timeout for listing (& downloading) Themes, please be
 increased to 15 seconds, just like the Plugins timeout.

 Thanks.

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


More information about the wp-trac mailing list