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:
Please help, thank you
Hi,
edit the virualhost in nginx - you need to increase the limits, try adding the following:
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
REPLY
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