Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HttpKernel] Logger makes nginx choke #38462

Closed
MatTheCat opened this issue Oct 7, 2020 · 2 comments
Closed

[HttpKernel] Logger makes nginx choke #38462

MatTheCat opened this issue Oct 7, 2020 · 2 comments

Comments

@MatTheCat
Copy link
Contributor

MatTheCat commented Oct 7, 2020

Symfony version(s) affected: probably every including #36855

Description

Now that HttpKernel’s logger uses error_log by default, it will make nginx choke with

upstream sent too big header while reading response header from upstream

if it sends some, using the default php-fpm and nginx docker images.

How to reproduce

  1. Start from symfony/skeleton
composer create-project symfony/skeleton symfony
cd symfony
  1. Add docker-compose.yml
version: "3"

services:
  nginx:
    image: nginx:1.19.3-alpine
    ports:
      - 80:80
    volumes:
      - ./www.conf:/etc/nginx/conf.d/www.conf:ro
      - ./public:/usr/share/nginx/html:ro

  php:
    image: php:7.4.11-fpm-alpine3.12
    volumes:
      - ./:/var/www/html
  1. Add www.conf
server {
    server_name domain.test;
    root /usr/share/nginx/html;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location = /index.php {
        fastcgi_pass php:9000;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME /var/www/html/public/index.php;

        internal;
    }
}
  1. Require some packages
composer require symfony/security-bundle symfony/stopwatch symfony/web-profiler-bundle
  1. Start services
docker-compose up -d
  1. Make domain.test resolve to 127.0.0.1
  2. Access http://domain.test/
@MatTheCat MatTheCat added the Bug label Oct 7, 2020
@MatTheCat MatTheCat changed the title [nginx] upstream sent too big header while reading response header from upstream [HttpKernel] Logger makes nginx choke Oct 8, 2020
@MatTheCat
Copy link
Contributor Author

@MatTheCat
Copy link
Contributor Author

MatTheCat commented Oct 26, 2020

I do not have the environment to test it but as docker-library/php#878 (comment) says, disabling fastcgi.logging could do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants