Nginx + php-fpm

Goti nginx-forum на forum.nginx.org
Чт Мар 29 14:27:37 UTC 2018


Всем привет, php жрет всю память, не могу понять почему ... 
Конфиг:
server {
        listen 80 default_server;
        listen [::]:80 default_server;

        server_name _;

        location / {
                root /var/www/html/dist/;
        }

        location /search/ {
                proxy_method GET;
                proxy_pass http://172.18.0.4:9200/index/index/_search$args;
        }

        location ~ /api/(.+)$ {
                fastcgi_pass unix:/run/php/php7.1-fpm.sock;

                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME 
/var/www/html/backend/web/app.php;
                fastcgi_param  SCRIPT_NAME /app.php;
                fastcgi_param  REQUEST_URI /$uri?$args;
        }
}



Вот лог:
2018/03/29 13:26:53 [error] 295#295: *3 FastCGI sent in stderr: "PHP
message: PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted
(tried to allocate 20480 bytes) in
/var/www/html/backend/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
on line 107
PHP message: PHP Fatal error:  Allowed memory size of 1073741824 bytes
exhausted (tried to allocate 20480 bytes) in
/var/www/html/backend/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php
on line 626" while reading response header from upstream, client: 127.0.0.1,
server: _, request: "GET /api/user/login-check HTTP/1.1", upstream:
"fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "localhost"



В чем может быть проблема ?

Posted at Nginx Forum: https://forum.nginx.org/read.php?21,279235,279235#msg-279235



Подробная информация о списке рассылки nginx-ru