title: 502 Bad Gateway ngnix for magento application
body: <p>Many times I browse Magento web site, I am getting 502 bad gateway error at Nginx.!
  Before this error page is taking 89 seconds to load.</p>
  
  <p><a href="http://i.stack.imgur.com/ZWzIG.jpg" rel="nofollow">screenshot</a></p>
  
  <p>Nginx Log error :- </p>
  
  <p>recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 1.0.0.1, server: www.example.com, request: </p>
  
  <p>My Nginx configuration below :- </p>
  
  <pre><code>fastcgi_buffer_size 128k;
  fastcgi_buffers 4 256k;
  fastcgi_busy_buffers_size 256k;
  fastcgi_temp_file_write_size 256k;
  </code></pre>