title: Nginx + PHP-FPM 502 Bad Gateway
body: <p>I am getting a <code>502 Bad Gateway</code> from Nginx on a line of PHP code that is working fine in other places of my program (<code>$this-&gt;provider = new OAuthProvider();</code>), and that have worked fine before. This is the message I get in the Nginx error log for each 502:  </p>
  
  <blockquote>
    <p>recv() failed (104: Connection reset by peer) while reading response header from upstream</p>
  </blockquote>
  
  <p>In the PHP-FPM log there is a warning for each 502:  </p>
  
  <blockquote>
    <p>[WARNING] [pool www] child 17427 exited on signal 11 SIGSEGV after 142070.657176 seconds from start</p>
  </blockquote>
  
  <p>After trying a number of changes to the nginx.conf I am stuck and would very much appreciate any pointers of what to do next.</p>
  
  <p>I'm running Nginx 0.7.67 and PHP 5.3.2 on Ubuntu 10.04.</p>