dpb42021
2018-04-02 20:52
浏览 79
已采纳

Symfony 3.3中允许的内存大小耗尽

On my production server with the following configuration:

  • Nginx
  • phpfpm-7.0
  • List item

Symfony3.3

I still receive 500 error while targeting home page with the following error in my phpFpm error logs acceding the app.php page:

[error] 16800#16800: *9 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in .../vendor/composer/autoload_static.php on line 4248" while reading response header from upstream, client: XXXXXXXX, server: _, request: "GET /app.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "XXXXXXX"

I tried to increase the memory_limit param in those locations without any change:

  • /etc/php/7.0/fpm/php.ini
  • /etc/php/7.0/fpm/php-fpm.conf
  • /etc/php/7.0/fpm/pool.d/www.conf
  • /etc/php/7.0/cli/php.ini

Do you have any idea where could it come from?

图片转代码服务由CSDN问答提供 功能建议

在我的生产服务器上,配置如下:

  • Nginx
  • phpfpm-7.0
  • 列表项

    Symfony3.3 \ n

    在我的phpFpm错误日志中加入app.php页面时,我仍然收到500错误,同时出现以下错误:

      [error] 16800#  16800:* 9在stderr中发送的FastCGI:“PHP消息:PHP致命错误:允许的内存大小为2097152字节耗尽(试图分配4096字节)在... / vendor / composer / autoload_static.php第4248行”,同时读取响应 来自上游的头,客户端:XXXXXXXX,服务器:_,请求:“GET /app.php HTTP / 1.1”,上游:“fastcgi:// unix:/var/run/php/php7.0-fpm.sock:”  ,主持人:“XXXXXXX”
       
     
     

    我试图在这些位置增加memory_limit参数而不做任何改动:

    • /etc/php/7.0/fpm/php.ini
    • /etc/php/7.0/fpm/php-fpm.conf
    • 的/ etc / PHP / 7.0 / FPM / pool.d / www.conf
    • 的/ etc / PHP /7.0/cli/php.ini
    nn

    你知道它会从哪里来吗?

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doubi7496 2018-04-02 21:36
    已采纳

    Ok solved.

    My issue was coming from extra configuration which was into /etc/php/7.0/fpm/php-fpm.conf file overriding the php.ini conf.

    Thank you!

    打赏 评论

相关推荐 更多相似问题