I tried the suggestions at:
How do I prevent a Gateway Timeout with FastCGI on Nginx
nginx.conf (inside of http section {})
#prevent gateway timeout
client_header_timeout 1000000;
client_body_timeout 1000000;
send_timeout 1000000;
fastcgi_read_timeout 1000000;
But after about 60 seconds I get an error 504 gateway timeout. We have nginxx in front of apache, so I am not sure if apache is causing the error, but we get a 504 gateway timeout that is clearly from nginx