修复Nginx报错:upstream sent too big header while reading response header from upstream

Posted 书山有路勤为径,学海无涯苦作舟(肖建锋)

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了修复Nginx报错:upstream sent too big header while reading response header from upstream相关的知识,希望对你有一定的参考价值。

在 nginx.conf 的http段,加入下面的配置:

proxy_buffer_size 128k;
 
proxy_buffers 32 32k;
 
proxy_busy_buffers_size 128k;

 

重启后一般就可以解决,如果还是报502,再在host配置的php段加入下面配置:

fastcgi_buffer_size 128k;
 
fastcgi_buffers 4 256k;
 
fastcgi_busy_buffers_size 256k;

 

重启nginx即可。

以上是关于修复Nginx报错:upstream sent too big header while reading response header from upstream的主要内容,如果未能解决你的问题,请参考以下文章

Nginx - upstream sent invalid chunked response while reading upstream 异常问题

nginx 错误502 upstream sent too big header while reading response header from upstream

错误502 upstream sent too big header

nginx四层代理日志配置

nginx代理https

压测引起的 nginx报错 502 no live upstreams while connecting to upstream解决