Applicable to:
- Plesk for Linux
Symptoms
- Websites are unavailable:
PLESK_INFO: 502 Bad Gateway
- In the log files
/var/log/nginx/error.log
or/var/www/vhosts/example.com/logs/proxy_error_log
the following error message can be found:
CONFIG_TEXT: [error] 14790#0: *188 upstream sent too big header while reading response header from upstream, client: 203.0.113.2, server: subdomain.example.com, request: "POST /admin_catalog.php HTTP/1.1", upstream: "http://10.0.0.1:7080/admin_catalog.php", host: "subdomain.example.com", referrer: "http://subdomain.example.com/admin_catalog.php"
Cause
A request cannot be processed by the proxy server because of insufficient buffer size.
Resolution
In Plesk interface for few domains
- Login into Plesk.
- For domains with PHP handler "FPM application served by Nginx", increase 'buffers" and 'buffer_size' in section under Plesk > Domains > example.com > Apache & nginx Settings >Additional nginx directives.
For example:CONFIG_TEXT: fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;- For other PHP handlers:
CONFIG_TEXT: proxy_buffers 8 16k;
proxy_buffer_size 32k;
Using SSH connection for the whole server
- Connect to the server using SSH.
- Increase 'buffers" and 'buffer_size' in
/etc/nginx/nginx.conf
underhttp {
section. For example:
CONFIG_TEXT: proxy_buffers 8 16k;
proxy_buffer_size 32k;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k; - Restart
nginx
service:
# service nginx restart
Increase values of these parameters if it is needed.
Comments
0 comments
Please sign in to leave a comment.