Symfony task - memory leak

后端 未结 3 797
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-16 00:50

I wrote a symfony task to fill a database of sample data. Here\'s a sample piece of code:

gc_enable();
Propel::disableInstancePooling();

public function tes         


        
3条回答
  •  忘掉有多难
    2021-01-16 01:19

    symfony CLI tasks require quite a lot of PHP memory, especially on Windows. If the Propel task is failing, I would recommend a permanent change to the php.ini file setting on memory allocation to at least 256M. I know this seems high, but you should only ever need these tasks on a development machine.

提交回复
热议问题