Note: This is a troubleshooting article for Plesk server only that requires basic technical knowledge and SSH/RDP connection to the server. This article does not guarantee that it will solve the issue, but it may be helpful in finding the original cause. If you don't have SSH/RDP credentials, contact server's administrator or hosting support that hosts your server.
Plesk is showing "504 Gateway Timeout" errorPlesk's engine (
sw-cp-server, sw-engine) is based on Nginx, so all the 504 Gateway Timeout errors are also written with nginx word.
General troubleshooting steps
The reason of 504 error can be found in Plesk web server log. In order to find exact reason why Plesk does not work properly:
Login to the server console and start tailing Plesk server log:
# tail -fn0 /var/log/sw-cp-server/error_logAdditional logs to check:
Reproduce the issue: try to login to Plesk or to perform an operation which fails.
The most popular issues are described below as well. Use the error from the output and try to find a solution in our knowledgebase
- 504 Gateway Timeout is shown while accessing Backup Manager with configured FTP storage: Unable to download remote file
- 504 Gateway Timeout is shown while accessing Plesk Backup Manager
- Fail2ban service gets stuck and unable to remove subscription with 504 Gateway Timeout error
- Unable to access Plesk after upgrade to 12.5.30: Upgrade stuck and login page is blank or 504 Gateway Timeout is shown
- Changing IP address for outgoing mail in Mail Server Settings fails with 504 Gateway Time-Out
- Unable to manage rules in Plesk Firewall: 504 Gateway Timeout
- Unable to install components using Plesk autoinstaller: 404 Not Found or The requested URL returned error 504
- Mailman admin page shows 504 Gateway Timeout
- Unable to upload database with phpMyAdmin: Script timeout passed or 504 Gateway Timeout is shown
Website is showing "504 Gateway Timeout" error sectionThis error appears when nginx is enabled on the server as proxy and it cannot communicate with apache process due to its failure.
General troubleshooting steps
This error appears when nginx is enabled on the server as proxy and it cannot communicate with apache process due to its failure. To check why website itself or any its part do not work with "504 Gateway Timeout" you need to check its logs:
Connect to the server via SSH
- Make sure that apache/httpd service is started. Make sure that apache is running on 7080/7081 ports with enabled nginx:
# netstat -ntpl | egrep "apache|httpd"If not, try to disable/enable nginx proxy in Plesk > Tools & Settings > Services Management - Reverse Proxy Server (nginx) or using:
# /usr/local/psa/admin/bin/nginxmng --disable
# /usr/local/psa/admin/bin/nginxmng --enable
Start monitoring apache
# tail -fn0 /var/log/httpd/error_log (for RHEL/CentOS)
# tail -fn0 /var/log/apache/error_log (for Debian/Ubuntu)
Try to open website or reproduce the issue.
If there is no output, check general website log and nginx server log:
# tail -fn0 /var/www/vhosts/example.com/logs/error_log
# tail -fn0 /var/log/nginx/error.log
- Use the error from the output and try to find a solution in the articles below or in our Knowledge Base.
- Nginx: 504 Gateway Time-out
- Websites on PHP-FPM shows 502 Bad Gateway or 504 Gateway Timeout: Reloading in progress
- 504 Gateway timeout is shown on Joomla websites: server reached MaxClients setting, consider raising the MaxClients setting
- All websites are showing 502 Bad Gateway or 504 Gateway Timeout
- Websites are inaccessible with 504 Gateway Timeout with enabled firewall: 110: Connection timed out