Nginx: upstream sent too big header while reading response header from upstream

After updating my server with Meteor version 1.4.3.1 I've been experiencing some problems with Nginx.

All services looked fine but when requesting a page I was getting the response:

*12 upstream sent too big header while reading response header from upstream

That problem caused requests not being served correctly and the Nginx server returning 502 Bad Gateway.

After some reading about what the problem was and how to solve it these changes to the Nginx configuration have solved my problem and everything is working fine again.

server {
    listen 80;
    proxy_buffering on;
    proxy_buffer_size 128k;
    proxy_buffers 4 256k;
    proxy_busy_buffers_size 256k;
}

This post really helped me to understand what the problem and the solution were:  https://talk.plesk.com/threads/nginx-error-upstream-sent-too-big-header.338232/