drip5880 2015-05-14 05:05
浏览 91
已采纳

symfony中的内存不足错误

I'm currently working on Symfony project (const VERSION ='2.5.10') and I am using xampp. PHP version is 5.5.19.

My problem is everytime I run my dev environment I get an error :

OutOfMemoryException: Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 3358976 bytes) in C:\xampp\htdocs\Editracker\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Profiler\FileProfilerStorage.php line 153

and everytime I refresh the page it gives different memory size. I also think that this is also the reason why my dev environment takes a lont time before it refreshes the page.

Your help is appreciated.

php.ini

memory_limit= '256M'

I tried to increase my memory limit,still it gives an error about memory limit

  • 写回答

5条回答 默认 最新

  • doubu8643 2015-05-14 05:27
    关注

    The most eager component in Symfony is a profiler. If you don't need profiler in some particular actions you can disable it via code:

    if ($this->container->has('profiler'))
    {
        $this->container->get('profiler')->disable();
    }
    

    You can also set global parameter in config:

    framework:
        profiler:
            collect: false
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型