

location ~* \.3 word error message – because Nginx doesn’t love you. Here, to fix the php file access, in Nginx virtual host configuration, our Support Engineers add FastCGI read timeout variable. Similarly, fix may involve modifying Nginx virtual host configuration too. Nginx virtual host configuration settings max_execution_time = 150Īdditionally, we raised the value of request_terminate_timeout setting in php.ini file too. In CentOS, we located “/etc/php.ini” and increased the value “ max_execution_time” by adding the following entry. Recently, our Support Engineers had to raise the value of max_execution_time in php.ini file. service php-fpm restartĪt times, to fix 504 Nginx timeout error, we may need to modify the php settings in php.ini file. Then, we add the following snippet to “nf”. In addition, if the values are already preset in “nf”, we will increase the value.Ģ. Then, our Support Engineers add codes in “nf”. Sometimes, increasing values in “nf” doesn’t resolve this issue. We edited the file /etc/nginx/conf.d/nf and added the following parameters to file “nf”. To fix the 504 error, we increased the timeout values in the file “nf”.ġ. Recently, in one of the customer’s server, Nginx was set up as a proxy server with PHP-FPM disabled. Usually, adjusting the timeout settings is one of the methods to fix 504 error. Now, let’s see how our Technical Team exactly fixed “504 timeout Nginx” error with different methods. Top reasons for the “504 timeout error,” and quick fix for it in Nginxįrom our experience in managing server, our Support Engineers often deal with this error and fixe it for our customers. In addition, this is a common error, most likely due to process exceeding the PHP execution time limit or the read timeout settings of FastCGI. Usually, the server sends back a 504 HTTP code when the request is not completed. Now, it is used for serving web pages, as reverse proxy, caching, load balancing, media streaming, and more.įurthermore, a 504 Nginx timeout error is one of the HTTP status code. Nginx is an open-source, high-performance HTTP web server. Today, let’s understand what is 504 timeout error in Nginx and reasons on why this error occurs, also the way Bobcares’ Engineers fix it.

That’s why, we often get requests from our customers to fix “504 timeout Nginx ” error as part of our Technical Support Services. Sometimes the errors are completely clueless and users may not know how to fix it.Ī typical example of such an error is “504 timeout error,” in Nginx, a tricky error to resolve. Website errors are always a mess for users.
