Nginx issue upstream sent too big header

Posted by Mohsen on 21 Aug, 2022

Issue

NGINX error : upstream sent too big header while reading response header from upstream

 

Cause

Too many files in a directory


Fix

Increase buffer size in NginX

fastcgi_buffers 16 16k; 
fastcgi_buffer_size 32k;

or even more

fastcgi_buffers 128 4096k;
fastcgi_buffer_size 4096k;