That's a lot of debugging when you could just have read the wiki instead: http://wiki.nginx.org/HttpFcgiModule#fastcgi_buffers
"If you want to disable buffering to disk for all replies that are greater than the FastCGI buffers and transfer data synchronously to the client set fastcgi_max_temp_file_size to 0."