If you are getting “504 Gateway Time-out” errors in a PHP Nginx PHP-FPM environment, review the following settings.
- php.ini:
max_execution_time = 300
- php-fpm.conf:
request_terminate_timeout 300
- nginx.conf:
fastcgi_read_timeout 300
However, if these settings do not resolve the error, you may be able to resolve the problem by setting fastcgi_read_timeout 300
in default.conf instead of nginx.conf.
Reference site: https://system.hot-maker.com/90/