title: 504 error in Nginx+Passenger for long running Rails processes
body: <p>We have a file import Rails process that runs for a long time. Since switching to Nginx from Apache, we began getting 504 timeout errors after exactly 10 minutes each time -- we don't have a 10 minute limit set anywhere in our nginx.conf. I've looked at several questions/answers on stackoverflow but haven't found a solution. I don't want to go back to Apache since we love Nginx's simplicity and speed but this is driving me crazy since I've tried every timeout config option in Nginx that I could find :-)</p>
  
  <p>This is currently what I have in our nginx.conf file -- what am I doing wrong? </p>
  
  <pre><code>http {
      keepalive_timeout 300 300;
      keepalive_requests 20;
      send_timeout 30m;
      proxy_read_timeout 30m;
      proxy_connect_timeout 30m;
      ...
  
      server {
          listen 80;
      ...
      server {
          listen 443;
  </code></pre>