Skip to main content

504 error on one VirtualHost on dedicated server

Comments

6 comments

  • rpvw
    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
  • borayeris
    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
  • rpvw
    calls to JavaScripts" aren't they client side? How can JS affect host?

    Many of the libraries that are used in the JS are Hosted on other servers eg Google
    0
  • borayeris
    Many of the libraries that are used in the JS are Hosted on other servers eg Google
    0
  • rpvw
    You seem to be struggling with understanding how the HTML/PHP/(whatever) builds the JavaScript code that it sends to the client web browser for execution. This article might help:
    0
  • cPanelMichael
    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.