While accessing Plesk Panel, I see the "502 Bad Gateway" error.
/var/log/sw-cp-server/error_log contains the following error message:
recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 184.108.40.206, server: , request: "POST <some url>
The issue is caused due to a small value being set for
fastcgi_buffer in the Plesk Panel configuration file for Nginx.
It is necessary to increase the buffer size inside the file
/etc/sw-cp-server/config as follows :
root@hostname:~# grep buffer /etc/sw-cp-server/config fastcgi_buffers 16 16k; fastcgi_buffer_size 32k;
root@hostname:~# grep buffer /etc/sw-cp-server/config fastcgi_buffers 32 32k; fastcgi_buffer_size 64k;
After editing the file, please restart the below services:
root@hostname:~# /etc/init.d/sw-cp-server restart root@hostname:~# /etc/init.d/sw-engine restart