Moderator
Yui
(@fierevere)
ゆい
Nginx shows 504 when it does not get any response from PHP backend for long time.
Try increasing timeouts.
A. If you are using PHP-FPM (fastcgi_pass)
location ~ \.php$ {
fastcgi_pass ...
fastcgi_read_timeout 300;
}
B. If you are using proxying (proxy_pass)
server {
...
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
...
}
Tune up to your needs. I think 3min (180 s) is reasonable, but setting it as high as 5 min (300 s) wont break the things and surely will reach PHP backend, or at least max_execution_time set for PHP
Yui,
Thanks for your reply, maybe a sily question but where do you change this?
The NAS i own is from Synology
Michael
Moderator
Yui
(@fierevere)
ゆい
in /etc/nginx.conf
(or /etc/nginx/nginx.conf some reddit threads say its in /usr/local/etc/nginx)
or its parts included from main file ( with include /path/to/file directive )
You have to restart nginx after changing its config.
(with nginx -s reload or via your OS services controller)
You can refer to your OS documentation where to find the files and how to restart nginx service.
-
This reply was modified 1 year, 11 months ago by
Yui.