• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Keeps receiving 502, 503, 504 error.

Brownsugar

New Pleskian
Keeps receiving 502, 503, 504 error with websites,
sometimes it's normal, sometimes down, and repeats,
upload_2017-9-7_23-35-45.png

tried to reboot server, restart service, change nginx settings, all not working.
However, there isn't any problem with plesk panel.
Also checked for error logs, but there isn't any error log while this situation happening.

Using php fpm 5.6.31 with nginx on, server health are all good.
 
Hi Brownsugar,

Also checked for error logs, but there isn't any error log while this situation happening
Well, sorry, but this is not possible. If you didn't switch off logging, then these errors will be certainly logged. Pls. have a closer look at your exsiting - log - files at:

=> /var/www/vhosts/system/(subdomain)YOUR-DOMAIN.COM/logs
... and post the corresponding errors for further investigations.


Pls. check as well you serverwide log - files at "/var/log" for nginx, apache2 and php-related - logs. ;)
 
Hi Brownsugar,


Well, sorry, but this is not possible. If you didn't switch off logging, then these errors will be certainly logged. Pls. have a closer look at your exsiting - log - files at:

=> /var/www/vhosts/system/(subdomain)YOUR-DOMAIN.COM/logs
... and post the corresponding errors for further investigations.


Pls. check as well you serverwide log - files at "/var/log" for nginx, apache2 and php-related - logs. ;)

OK, I just saw php-fpm error log yesterday, so I got nothing,

here is my logs/error_log, I paste some lines appear the most:
Code:
[Thu Sep 07 23:07:47.810652 2017] [proxy_fcgi:error] [pid 5610:tid 140106075002624] (22)Invalid argument: [client 124.6.**.**:47388] AH01075: Error dispatching request to :
[Thu Sep 07 23:07:50.491240 2017] [proxy_fcgi:error] [pid 11652:tid 140105993942784] [client 114.36.**.**:47706] AH01068: Got bogus version 65, referer: https://
[Thu Sep 07 23:07:50.491282 2017] [proxy_fcgi:error] [pid 11652:tid 140105993942784] (22)Invalid argument: [client 114.36.**.**:47706] AH01075: Error dispatching request to :, referer: https://
[Thu Sep 07 23:07:52.185528 2017] [proxy_fcgi:error] [pid 6952:tid 140105993942784] (70007)The timeout specified has expired: [client 36.225.**.**:46426] AH01075: Error dispatching request to :, referer: https://
[Thu Sep 07 23:07:59.798850 2017] [proxy_fcgi:error] [pid 11102:tid 140106075002624] [client 111.241.**.**:47826] AH01068: Got bogus version 246, referer: https://
[Thu Sep 07 23:07:59.798890 2017] [proxy_fcgi:error] [pid 11102:tid 140106075002624] (22)Invalid argument: [client 111.241.**.**:47826] AH01075: Error dispatching request to :, referer: https://
[Thu Sep 07 23:08:24.634085 2017] [proxy_fcgi:error] [pid 7211:tid 140105851266816] (70007)The timeout specified has expired: [client 124.6.**.**:47158] AH01075: Error dispatching request to :
[Thu Sep 07 23:08:50.221392 2017] [proxy_fcgi:error] [pid 11603:tid 140105968764672] [client 118.165.**.**:48466] AH01068: Got bogus version 91, referer: https://
[Thu Sep 07 23:08:50.221439 2017] [proxy_fcgi:error] [pid 11603:tid 140105968764672] (22)Invalid argument: [client 118.165.**.**:48466] AH01075: Error dispatching request to :, referer: https://
[Thu Sep 07 23:10:10.277761 2017] [proxy_fcgi:error] [pid 6782:tid 140105977157376] (70007)The timeout specified has expired: [client 114.37.**.**:49470] AH01075: Error dispatching request to :, referer: https://
[Thu Sep 07 23:10:10.278208 2017] [proxy_fcgi:error] [pid 6782:tid 140105993942784] (70007)The timeout specified has expired: [client 114.37.**.**:49468] AH01075: Error dispatching request to :, referer: https://
[Thu Sep 07 23:10:10.278471 2017] [proxy_fcgi:error] [pid 6782:tid 140105960371968] (70007)The timeout specified has expired: [client 114.37.**.**:49466] AH01075: Error dispatching request to :, referer: https://
[Thu Sep 07 23:10:10.280845 2017] [proxy_fcgi:error] [pid 6782:tid 140105834481408] (70007)The timeout specified has expired: [client 114.37.**.**:49480] AH01075: Error dispatching request to :, referer: https://
[Thu Sep 07 23:10:10.281375 2017] [proxy_fcgi:error] [pid 6782:tid 140105809303296] (70007)The timeout specified has expired: [client 114.37.**.**:49474] AH01075: Error dispatching request to :, referer: https://

/var/log/httpd/error_log just some warns, /var/log/nginx/error_log just files not found messages.

BTW, I just googled this info and followed this tutorial to change php-fpm pool settings, and the server works fine now, but I didn't get the same error log as his, I don't know if this problem related to the log above, or there is something reason else?
 
Last edited:
Hello mate,

It actually seems like a php problem and its few resources to execute before a web with great weight.

Try increasing the values inside the php configuration page
memory_limit
max_execution_time

and accordingly max_input_time

I helped me to solve the 502 use the following parameter right at the bottom of the page

[php-fpm-pool-settings]
pm.max_children = 400
pm.max_requests = 400

I put those values because my website required it and my machine is very powerful.

I hope this helps you
 
Back
Top