Dennis Zheleznyak

Dennis Zheleznyak

DevOps Engineer bigpanda

© 2021

Increase Nginx buffers due to errros

If you’re getting the following error in your nginx logs:

[error] 12345#0: upstream sent too big header while reading response header from upstream,

You need to increase the buffers for that specific location inside nginx configuration:

server {
  listen        80;
  server_name   example.com;

  location / {
    proxy_pass       http://someUpstream;
    proxy_buffer_size          128k;
    proxy_buffers              4 256k;
    proxy_busy_buffers_size    256k;
  }
}