I ran into SSL timeouts on in local development setup when I was re-factoring some integration code with facebook and using their SDK. It was tricky to diagnose, I was sure that my changes couldn’t be the cause, and I finally confirmed it by running our production codebase. Since it was having the same timeout error, I knew the bug had to be in an underlying layer.
For the record, I’m running this version of curl on my Archlinux box:
<code>curl 7.25.0 (x86_64-unknown-linux-gnu) libcurl/7.25.0<br /> OpenSSL/1.0.1 zlib/1.2.6 libssh2/1.4.0 </code>
I also got the error from the command line with
<code>curl "https://graph.facebook.com/oauth/access_token" </code>
But it is fixed with
<code>curl --sslv3 "https://graph.facebook.com/oauth/access_token" </code>
On a debian squeeze server, with the latest (4/3/2011) version of curl:
<code>curl 7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0<br /> OpenSSL/0.9.8o zlib/22.214.171.124 libidn/1.15 libssh2/1.2.6 </code>
The timeout does not happen with either of the following commands:
<code>curl "https://graph.facebook.com/oauth/access_token" curl --sslv3 "https://graph.facebook.com/oauth/access_token" </code>
The time out does not happen on OS X which runs
So, this timeout only seems to affect users with very new version of curl. Fixing it requires adding a line to the Facebook PHP SDK, which while minor, you have to remember if you ever upgrade it. At the same time, this bug could come back and bite you down the road if your operating system sneaks in a newer version of curl. You can see a fork of the PHP SDK with this fix on github.