CURL broken in CentOS 7 / RHEL7 for past year
If you suspected maybe WordPress and other PHP apps were slower to ping/trackback sites and other fetches under CentOS 7 than CentOS 6, you aren’t imagining things.
Apparently libCurl (and therefore Curl in PHP) has been broken for over a year now without RedHat applying the available patch and pushing an update.
patch: https://github.com/bagder/curl/commit/d529f388 (note July 2013)
Basically 150ms-350ms delay is added to every external page fetch. It might even be affecting wp-cron. For one fetch it is not bothersome, but if you have to ping a dozen sites, it adds up to causing a several second delay for no reason.
Hopefully they will address this very soon, meanwhile I’ve found a workaround.
I’ll add more detailed instructions later but for now I’ve discovered that the Fedora Core 19 from RedHat is (mostly) binary compatible with RHEL7 / CentOS7 so we can use the 7.29 from that version that has been patched up to 27 (vs 19) by the very same person at Redhat who applies the RHEL patches.
for people who know what they are doing, download curl, libcurl and libcurl-devel from here:
and then use YUM or RPM to install
yum install *.fc19.x86_64.rpm
– this way it can be undone later when centos finally updates someday
if you need to undo it, just replace back these versions
Because they are both 7.29 and no dependencies change, you do NOT need to recompile PHP or any other program that relies on the libcurl libraries.
You can clearly see the change on this graph on the far right from the switch:
1. dns time drops to 4ms reading from the resolver cache instead of 150-350ms
2. connect time drops from 420ms to 74ms
3. time to first byte drops from 489ms to 143ms
4. download speed improves from 40KB/sec to 65KB/sec