making bbPress (and WordPress) work better!

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: (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


3 responses

  1. thanks for heads up – Centmin Mod LEMP has a addon for curl 7.43+ and it seems curl 7.43+ has the fix 🙂

    September 16, 2015 at 7:54 pm

    • I had seen your fix but since it replaces all those dependencies seemed like a dangerous idea as it might require some thing to be recompiled. The drop-in replacement from FC19 doesn’t need any dependencies messed with and is 100% compatible.

      September 17, 2015 at 3:53 am

  2. Actually, it includes a package to retain all the older dependencies as well

    rpm -ql libcurl7155 libcurl7112 | grep .so

    been using it for over a year starting with curl 7.29 for centos 6.x way back but only started using it with curl 7.43+ in past few months 🙂

    September 17, 2015 at 6:39 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s