Upstream sent too big header while reasponse response header

How to fix the upstream sent too big header while reading response header from upstream error.

The error will appear in Nginx error logs as:

* upstream sent too big header while reading response header from upstream, client: 10.20.30.40, server: localhost.example,

Update buffer sizes

Edit the nginx.conf file to update the buffer sizes:

server {
    fastcgi_buffers                 16  16k;
    fastcgi_buffer_size             32k;
    proxy_buffer_size               128k;
    proxy_buffers                   4 256k;
    proxy_busy_buffers_size         256k;
}