Nginx - 502 Bad Gateway - upstream sent too big header

Autor Čolek
Publikováno 18.11.2020
Kategorie linux
Stav Vyřešeno
Dobrý den,

pracuji v PHP frameworku Symfony a během $entityManager->flush(); na mě vyskočí hláška z Nginx na Linuxu 502 Bad Gateway

Toto je výpis logu nginx:
tail /var/log/nginx/error.log

2020/11/05 08:51:58 [error] 205847#205847: *28695 upstream sent too big header while reading response header from upstream, client: 192.168.5.66, server: , request: "GET /data/import HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "192.168.5.66:8015", referrer: "http://192.168.5.66:8015/data"


Díky za pomoc


Odpovědi na dotaz

The English language is translated by machine - the translator can modify eg cited codes = it is better to use codes from the Czech original.

Nginx - 502 Bad Gateway - upstream sent too big header

Hi,

I work in the PHP framework Symfony and during $ entityManager-> flush (); a message from nginx pops up at me 502 Bad Gateway

This is a listing of the nginx log:
tail /var/log/nginx/error.log

2020/11/05 08:51:58 [error] 205847#205847: *28695 upstream sent too big header while reading response header from upstream, client: 192.168.5.66, server: , request: "GET /data/import HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "192.168.5.66:8015", referrer: "http://192.168.5.66:8015/data"


Please help, thank you

RE: Nginx - 502 Bad Gateway - upstream sent too big…

Autor Oxytocin
Publikováno 23.11.2020
Kategorie linux
Stav Zkontrolováno
Dobrý den,

upravte v nginx daný virualhost - je třeba navýšit limity, zkuste přidat tyto:

vim /etc/nginx/sites-available/virtualhost.conf

server {
.................
fastcgi_buffers 16 32k;
fastcgi_buffer_size 64k;
fastcgi_busy_buffers_size 64k;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
....................


systemctl reload nginx;systemctl restart php7.4-fpm



The English language is translated by machine - the translator can modify eg cited codes = it is better to use codes from the Czech original.

Nginx - 502 Bad Gateway - upstream sent too big header

Hi,

edit the virualhost in nginx - you need to increase the limits, try adding the following:

vim /etc/nginx/sites-available/virtualhost.conf

server {
.................
fastcgi_buffers 16 32k;
fastcgi_buffer_size 64k;
fastcgi_busy_buffers_size 64k;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
....................


systemctl reload nginx;systemctl restart php7.4-fpm


Tento web používá k poskytování služeb, personalizaci reklam a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tím souhlasíte. Další informace