• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Server periodically unavailable or very slow with errors 502/504

Martin589

New Pleskian
Hello,

a virtual server throws error 502 or 504 bad gateway several times a day. When this happens, log in to Plesk is usually possible, but very slow.

In the proxy_error_log of the domain that has the most visitors (and thus is most affected by the problem) I frequently see the following line:

[error] 32214#0: *1062898 upstream timed out (110: Connection timed out) while reading response header from upstream, client: x.x.x.x, server: domain.com, request: "GET /?cat=10 HTTP/2.0", upstream: "fastcgi://unix:///var/www/vhosts/system/domain.com/php-fpm.sock", host: "domain.com"

I have searched and tried various threads on this topic, but nothing seems to help.

Server specs:
Plesk Onyx Version 17.8.11 Update #69
Six cores, 12 GB RAM (10-20% in use)
Approx. ten domains, five of them running Wordpress.

Thanks in advance.

Martin
 
I have searched and tried various threads on this topic, but nothing seems to help.
Contact Plesk Support Team in this case. Experienced supporters will check and fix this issue directly on your server.
 
Or do this while a 504 situation occurs:
# watch "ps aux | sort -nrk 3,3 | head -n 20"
and watch what is causing the high load. It might give you the necessary clue to find out what's going on.
 
Also, use "sensors" to check your cpu temperature. We had a similar problem when a CPU fan was broken. As long as traffic was only normal users, the system ran normally, but when the crawlers hit, the system would slow down and throw all kinds of timeouts.
 
Or do this while a 504 situation occurs:
# watch "ps aux | sort -nrk 3,3 | head -n 20"
and watch what is causing the high load. It might give you the necessary clue to find out what's going on.

I made the following screenshots when the server was working and when it was not (the two right underneath each other, about five minutes apart). Do you have any suggestions what might be wrong?

@IgorG: Can I use the Plesk support for a version of Plesk that I did not licence myself? It was included with the virtual server.

@mow: Since this is a virtual server, I guess I won't be able to check any hardware sensors.
 

Attachments

  • serverprob.jpg
    serverprob.jpg
    529.4 KB · Views: 15
  • serverok.jpg
    serverok.jpg
    269.9 KB · Views: 13
I have the same issue. But this only happens in connection with Roundcube. On the subdomain webmail.mydomain.com I get the following message: 504 Gateway Time-out nginx. The domain www.mydomain.com is not affected.

‪Ubuntu 18.04.3 LTS‬
Plesk Onyx 17.8.11
 
I changed my email setting to Horde and then back to Roundcube. I don't know the reason. At the moment everything looks good. :)
 
The problem was a wrong PHP-FPM configuration. After the optimization the troubles were solved.
 
The problem was a wrong PHP-FPM configuration. After the optimization the troubles were solved.

Can you elaborate on what you did to fix the misconfiguration? We're seeing this too on one of our PHP-FPM servers.
 
Back
Top