If you run a Nginx web server you may have already encountered the annoying 504 Gateway Time-out errors. This is pretty common error, are generated most probably by the PHP max execution time limit or by the FastCGI read timeout settings. This tutorial shows you how to fix nginx 504 gateway timeout on the nginx webserver.
Read more at idroot