title: PHP file_get_contents('php://input') very slow
body: <p>I have a complex PHP application that uses an ESB model built with Zend Framework v1.x. Performance has become an issue, and now I know why: reading the php://input stream is consistently taking almost exactly 10 seconds.</p>
  
  <p>Here is a snippet from an XDebug trace log:</p>
  
  <pre><code>0.3985    6935880    -&gt; Zend_Controller_Request_Http-&gt;getRawBody() /var/www/vas/Adapters/Database/application/controllers/AdapterController.php:473
  0.3985    6936104    -&gt; file_get_contents() /usr/share/php/ZendFramework-1.12.0/library/Zend/Controller/Request/Http.php:961
  10.4134   6936096    -&gt; trim() /usr/share/php/ZendFramework-1.12.0/library/Zend/Controller/Request/Http.php:963
  </code></pre>
  
  <p>We deploy a ESB model, with requests going fro the portal, to the ESB, to the data base adapter. Hitting any one server by itself doesn't seem to be problematic, but as soon as the request goes between servers (which are actually vhosts on the same server), the problem rears  itself.</p>