php7.2-fpm 超时 nginx wsl 18.04

voi*_*ixx 0 ubuntu fastcgi nginx windows-subsystem-for-linux ubuntu-18.04

我最近从 Ubuntu wsl 16.04 升级到 18.04。

完成后,我恢复了本地开发,很高兴发现(几乎)一切正常。

由于某种原因,我现在在 php-fpm 中遇到此错误

2018/09/19 21:17:26 [error] 3736#3736: *1 upstream timed out (110: Connection timed out) while reading upstream, client: ::1, server: _, request: "GET /register HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost"

以下是我的 /etc/nginx/sites-available/default 文件的相关内容。

    location ~ \.php$ {
            include snippets/fastcgi-php.conf;

            # With php7.0-cgi alone:
            fastcgi_pass 127.0.0.1:9000;
            # With php7.0-fpm:
            #fastcgi_pass unix:/run/php/php7.2-fpm.sock;
            fastcgi_read_timeout 300;
    }
Run Code Online (Sandbox Code Playgroud)

以及 /etc/php/7.2/fpm/pool.d/www.conf 中的相关行

listen = 127.0.0.1:9000

我也尝试取消注释 listen.allowed_clients = 127.0.0.1 但仍然相同。

我这里一定缺少什么东西。www.conf 文件在升级过程中被重置为默认值,其中必须有某些内容。任何帮助是极大的赞赏。

voi*_*ixx 7

解决方案是将其放入我的 nginx 配置的位置块中:

fastcgi_buffering off;
Run Code Online (Sandbox Code Playgroud)

在第一行