title: Set global CURL timeout
body: <p>I am using a proprietary, 3rd party Drupal module that queries a 3rd party service via curl.  The service has been a bit flakey lately, which is slowing my page loads a lot and when I've got a lot of traffic I am hitting max_connections.</p>
  
  <p>The information that this extension queries is not vital, but it is important enough that I can't just remove the module.  For the time being, I fixed it by patching the module to add a curl timeout to the request:</p>
  
  <pre><code>curl_setopt($ch, CURLOPT_TIMEOUT, 1);
  </code></pre>
  
  <p>However, I don't want to leave the hack in place because it'll disappear on the next update and since the problem is intermittent it won't show up in testing.</p>
  
  <p>Is there any way to set the timeout globally in a php.ini setting or in PHP via code (that I could drop in a custom module)?</p>
  
  <p>Any help is appreciated,</p>
  
  <p>Thanks</p>