WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#8086 closed defect (bug) (fixed)

Don't use blocking transports for cron

Reported by: ryan Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.7
Component: General Keywords:
Focuses: Cc:

Description

Transports that do not support non-blocking mode can cause long delays when spawning cron. This is seen after publishing when cron blocks while processing pings.

Possible fixes:

  • Prioritize non-blocking transports for non-blocking requests.
  • Force cron to use fsockopen.

Attachments (2)

list_transports.php (647 bytes) - added by ryan 6 years ago.
Plugin that lists available transports in the admin footer.
spawn_cron_timeout.diff (412 bytes) - added by ryan 6 years ago.
Try integer timeout instead of float.

Download all attachments as: .zip

Change History (7)

comment:1 @ryan7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [9572]) Prioritize transports differently for non-blocking requests. fixes #8086

comment:2 @DD327 years ago

Did you by any chance forget to set the non-blocking transports for the GET branch?

foreach ( array('curl', 'streams', 'fopen', 'fsockopen', 'exthttp') as $transport ) {

vs

foreach ( array('streams', 'fsockopen', 'exthttp') as $transport ) {

comment:3 @ryan7 years ago

get and post should return the same transports they did before, just in a different order if non-blocking. Post doesn't have as many transports as get.

comment:4 @DD327 years ago

oh.. Right! :) Here was I thinking that it wouldnt return a blocking transport at all for a non-blocking request. Its still early :)

@ryan6 years ago

Plugin that lists available transports in the admin footer.

@ryan6 years ago

Try integer timeout instead of float.

comment:5 @ryan6 years ago

(In [10025]) Round timeouts less then 1 but greater than 0 to 1 for curl transport. see #8086

Note: See TracTickets for help on using tickets.