Skip to main content

Upstream sent too big header while reading response header from upstream

· One min read
Stephan Hochdörfer

Whilst setting up a new local Magento development project, I ran into the problem that nginx sometimes errored “Upstream sent too big header while reading response header from upstream”.

As it seems, Magento 2 has issues with the response sizes and the only option to “fix” it, is to change the nginx configuration. Search for the fastcgi_buffers and fastcgi_buffer_size settings in your nginx configuration and adjust these values. The following values helped in my case:

fastcgi_buffers 16 256k;
fastcgi_buffer_size 256k;

After restarting nginx, the errors are gone.