Try raising the request_terminate_timeout setting in the php.ini file (CentOS path is /etc/php-fpm.d): request_terminate_timeout = 150įinally, add the fastcgi_read_timeout variable inside our Nginx virtual host configuration: location ~* \. I will show you the step-by-step fixing of 504 Gateway Time-out. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘ sudo‘ to the commands to get root privileges. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. Changes in PHP-FPM For Ubuntu 14.04 or PHP 5 For Ubuntu 16.04 LTE or PHP 7.0 3. For example, if the timeout setting is too low, Nginx may give up before the upstream server has a chance to respond. Changes in php.ini For Ubuntu 14.04 or PHP 5 For Ubuntu 16.04 LTE or PHP 7.0 2. Go to solution Did you know you can see the translated content as per your choice Translation is in progress. ![]() Configuration issues: If the Nginx configuration is not set up correctly, it may cause a 504 error.We have tried setting the CommandTimeout to 900 seconds as below. Network connectivity issues: If there is a problem with the network connectivity between Nginx and the upstream server, the request may time out, resulting in a 504 error. This query fetches data from many related tables using Include () For large data we have noticed that the web service return a 504 Gateway Timeout.Excessive traffic: If the upstream server is handling too much traffic, it may not be able to respond quickly enough to Nginx’s requests, leading to a 504 error.Slow response time from the upstream server: If the upstream server takes too long to respond to Nginx’s request, Nginx will eventually give up and return a 504 error.There are several possible causes of a 504 Gateway Time-out error in Nginx, including: To avoid getting 504 errors after increasing PHP-FPM timeout which can be because of Nginx timeout, the default is 60 seconds, you can increase fastcgireadtimeout directive in /etc/nginx/nf file. ![]() This error message indicates that the server was unable to complete the request made by the client in the specified time frame. If you are running a website that is powered by Nginx, you might have come across the 504 Gateway Time-out error. ![]() In this tutorial, we will show you how to fix 504 gateway time-out on the Nginx.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |