How to configure nginx + Unicorn to avoid timeout errors?
问题 I have a Rails (v3.2.13, Ruby 2.0.0) application running on nginx + Unicorn (Ubuntu 12.04). All is working well, except when an admin user is uploading users (thousands) via a CVS file. The problem is that I have set timeout to 30 seconds and the import process takes much more time. So, after 30 seconds I get an nginx 502 Bad Gateway page (Unicorn worker is killed). The obvious solution is to increase timeout, but I don't want this because it'll cause another problems (I guess), because it's