I've got a Magento installation, which works perfectly from a customer's point of view. However, when you try and do batch tasks with the admin, nginx often closes the connection to the browser early, causing an "empty reply from server" error in the browser. The backend task still goes on inside Apache until it completes. PHP is configured with Magento's default max_execution_timeout of 18000 seconds.
I found an article that kind of related to this, and suggested using the "send_timeout" directive in nginx's config. So I set that to the same as max_execution_time of 18000 seconds. Then I created a PHP script which simply sleeps for 65 seconds (it seems to timeout at 60 seconds).
It's not just the browser that's got the issue. I get "curl: (52) Empty reply from server" from curl as well. I don't have any other obscure nginx config rules in the http directive. Anyone have any idea what might be going on here, and how to go about stopping this from happening? I'm getting a bit lost :(