php/symfony/doctrine memory leak?

后端 未结 9 1775
旧时难觅i
旧时难觅i 2020-11-30 00:34

I\'m having problems with a batch insertion of objects into a database using symfony 1.4 and doctrine 1.2.

My model has a certain kind of object called \"Sector\", e

9条回答
  •  野性不改
    2020-11-30 01:26

    Doctrine leaks and there's not much you can do about it. Make sure you use $q->free() whenever applicable to minimize the effect. Doctrine is not meant for maintenance scripts. The only way to work around this problem is to break you script to parts which will perform part of the task. One way to do that is to add a start parameter to your script and after a certain amount of objects had been processed, the script redirects to itself with a higher start value. This works well for me although it makes writing maintenance scripts more cumbersome.

提交回复
热议问题