504 error on one VirtualHost on dedicated server
Hi,
I have 60 sites on my server. Sometimes one site freezes or gives 504 error. I understand if all freezes because of overload but how can one virtualhost freeze?
When that site freezes I htop and saw many
UserOfFrozenDomain /usr/local/apache/bin/httpd -k start -DSSL
Other apache instances of domains runs and ends perfectly at that time.
What should I monitor?
PS: I use php-fpm.
-
My understanding of a 504 error (sometimes referred to as a 504 Gateway Timeout Error) is when a website on one server did not get a timely response when requesting data from another server. An example might be calls to JavaScripts that are hosted on some other server, or calls to embedded videos that are hosted on YouTube or dynamic API content like a Facebook Timeline that is being displayed inside a WordPress page. You may want to audit the code and see if the particular hosted domain in question uses an unusual amount of calls off-server to complete its build of a requested page. You might also want to ensure the IP's of any external calls are whitelisted in your firewall software so that they don't get accidentally blocked and prevent a page from completing its build. Ultimately, it should be possible to have the page return ...something... rather than a 504 error in the event of the upstream data not being available. Hope this helps ***EDIT*** As you are using PHP/FPM you might like to explore using the request_terminate_timeout setting in PHP to set a higher value. Full details from PHP: Configuration - Manual 0 -
My understanding of a 504 error (sometimes referred to as a 504 Gateway Timeout Error) is when a website on one server did not get a timely response when requesting data from another server. An example might be calls to JavaScripts that are hosted on some other server, or calls to embedded videos that are hosted on YouTube or dynamic API content like a Facebook Timeline that is being displayed inside a WordPress page. You may want to audit the code and see if the particular hosted domain in question uses an unusual amount of calls off-server to complete its build of a requested page. You might also want to ensure the IP's of any external calls are whitelisted in your firewall software so that they don't get accidentally blocked and prevent a page from completing its build. Ultimately, it should be possible to have the page return ...something... rather than a 504 error in the event of the upstream data not being available. Hope this helps ***EDIT*** As you are using PHP/FPM you might like to explore using the request_terminate_timeout setting in PHP to set a higher value. Full details from
0 -
Hello @borayeris, I recommend searching the PHP-FPM error logs (/opt/cpanel/ea-php$$/root/usr/var/log/php-fpm/error.log) for entries appearing at the time of the error to see if you notice any specific output. You'd replace ea-php$$ with each specific version of PHP (e.g. ea-php70) that PHP-FPM is utilized with on your system. The global Apache error log (/usr/local/apache/logs/error_log) is also worth reviewing. Thank you. 0
Please sign in to leave a comment.
Comments
6 comments