title: curl_multi_exec not returning the entire response
body: <p>I have the following code, but quite often the response is cut short and it fails to parse the XML. Is there a way to fix it?</p>
  
  <pre><code>do {
      curl_multi_exec($mh, $running);
      curl_multi_select($mh);
  } while ($running &gt; 0);
  $ebayResponse = curl_multi_getcontent($ebayRequest);
  curl_multi_remove_handle($mh, $ebayRequest); //close the handles
  try {
    $ebay = simplexml_load_string($ebayResponse);
  } catch (yii\base\ErrorException $e) {
    Yii::error("Could not parse EBay XML response. $e");
    Yii::error("Could not parse EBay XML response, \$ebayResponse: $ebayResponse");
  </code></pre>
  
  <p>I'm seeing many of these error in the logs</p>
  
  <pre><code>Could not parse EBay XML response. exception 'yii\base\ErrorException' with message 'simplexml_load_string(): Entity: line 1: parser error : Couldn't find end of Start Tag tim line 1' in /app/controllers/ShoppingController.php:97 Context
  Could not parse EBay XML response. exception 'yii\base\ErrorException' with message 'simplexml_load_string(): Entity: line 1: parser error : Premature end of data in tag shippingType line 1' in /app/controllers/ShoppingController.php:97 Context
  </code></pre>
  
  <p>Ok I added more logging and this is the complete response from Ebay: <a href="http://pastie.org/private/wrucbjdaftuusskbzlzwq" rel="nofollow">http://pastie.org/private/wrucbjdaftuusskbzlzwq</a> . Notice the last tag is not closed, so the response is being truncated somehow.</p>