title: AMFPHP gameway.php 502 Error
body: <p>I am developing an app that is built with Flex and AMFPHP. Everything works fine, however, in some cases such as if I'm calling the same function in 5 seconds intervals, or when I call 2 different functions in short periods, I get a fault saying</p>
  
  <pre><code>RPC Fault faultString="error" faultCode="Channel.Call.Failed" faultDetail="NetConnection.Call.Failed: HTTP: Status 502
  </code></pre>
  
  <p>And at nginx error.log, I receive</p>
  
  <pre><code>recv() failed (104: Connection reset by peer) while reading response header from upstream, .... 
  request: "POST /amfphp/gateway.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: 
  </code></pre>
  
  <p>Using nginx, php5-fpm.</p>
  
  <p>How can I solve this?
  Thanks in advance.</p>