title: cURL connection drops despite being set to indefinate
body: <p>We wrote a php/ajax application that connects to an API through cURL.  We built it to stay connected indefinately, it worked fine, we were happy, used it periodically, then moved on to other projects.</p>
  
  <p>We re-visited it recently and discovered that it had begun timing out at varying intervals.  We checked the script looking for anything that could affect the cURL calls.  Nothing. </p>
  
  <p>We had, and have, these options in our simple cURL script:</p>
  
  <pre><code>$sch = curl_init();
  curl_setopt( $sch, CURLOPT_SSL_VERIFYHOST, 0);
  curl_setopt($sch, CURLOPT_URL, $test_url);
  curl_setopt($sch, CURLOPT_WRITEFUNCTION, 'get_data');
  curl_setopt($sch, CURLOPT_NOSIGNAL, 1);
  curl_setopt($sch, CURLOPT_TIMEOUT,0);
  $output = curl_exec($sch); 
  </code></pre>
  
  <p>My understanding is that the effect of the NOSIGNAL and TIMEOUT options is what kept our connection open.</p>
  
  <p>But it's not working.  </p>
  
  <p>I have two questions.<br />
  1) any ideas on the coding, anything we're missing in the cURL, or could there be something elsewhere in the code that could affect the connection?  What could affect the connection?<br />
  2) if the problem is not with the coding, how can we check the upstream connection. How do you detect where, and why, the connection is actually being dropped?</p>
  
  <p>Thank you for your suggestions and if you have any questions or need other information, don't hesitate to post.  </p>
  
  <p>Thanks</p>
  
  <p>Sam </p>