[wp-trac] [WordPress Trac] #18738: Improving cron spawning and other non-blocking HTTP requests
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 22 00:56:21 UTC 2011
#18738: Improving cron spawning and other non-blocking HTTP requests
-------------------------+------------------------------
Reporter: johnbillion | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by dd32):
Not sure what's going on here, but it needs some further investigation.
Fsockopen writes the data, and then fclose()'s on it.
Streams writes the data, uses the `stream_set_blocking()` function to
create a non-blocking request, and then fclose()'s on the handle
Curl uses curl_exec() followed by curl_close() - this could be causing it
to wait, we "recently" changed the headers handling of the call, that
might've affected it.
At one point in time, we had a different order for blocking/non-blocking
as the PHP HTTP Extension didn't support non-blocking requests, when we
removed that, the requests appeared to be working then, so I'm wondering
if something changed in the way commands are executed. After reading a few
paged on curl, it appears that DNS timeouts might come into it as well, as
well as, long connection times (ie. 300ms of latency whilst waiting for
the host to respond, might cause the curl_Exec() to hang for up to 900ms).
If non-blocking requests weren't working at all, I'd expect to see a lot
of reports of slow blogs, given it's in use by the cron system..
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18738#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list