I don't thing CURLOPT_CONNECTTIMEOUT is enough.
I would add something like this:
curl_setopt($ch, CURLOPT_TIMEOUT, 2 /* wait */);

Also use constants instead of magic numbers