Nginx + php7.1-fpm, se agotó el tiempo de espera del flujo ascendente (110: Se agotó el tiempo de espera de la conexión) al leer el encabezado de respuesta del flujo ascendente

Nginx + php7.1-fpm, se agotó el tiempo de espera del flujo ascendente (110: Se agotó el tiempo de espera de la conexión) al leer el encabezado de respuesta del flujo ascendente

Instalé Nginx y php7.1-fpm en Ubuntu 16.04. Estaba funcionando perfectamente bien. Empecé a recibir 504 Gateway Time-outun error.

Cuando revisé el registro de Nginx, obtuve estos errores:

 *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: server.name,, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock", host: "example.com", referrer: "http://example.com/"

Aquí está mi archivo de host virtual.

server {

    listen 80 default_server;
        listen [::]:80 default_server;

    server_name example.com;

    root /var/www/example/public;

        index index.html index.htm index.nginx-debian.html index.php;

        location / {

                 try_files $uri $uri/ /index.php?$query_string;

        }

    location ~ \.php$ {
            try_files $uri /index.php =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
                include fastcgi_params;
        }


    location ~ /\.ht {
                deny all;
        }
}

Indique por qué recibo este error. Cómo puedo resolverlo.

información relacionada