correct, disabling the logger is the only solution. its probably not very useful to have the logger enabled in console aswell, but i dont see an immediate solution to fixing this.
You can of course do $em->getconfiguration()->setSQLLogger(null); in the command On Sat, 30 Jul 2011 08:11:24 -0700 (PDT) AdrienBrault <mon...@gmail.com> wrote: > Hi, > > I've been using Doctrine in a Command to do batch inserts and selects. > At some point PHP ran out of memory. > > I first followed the instructions described here : > http://www.doctrine-project.org/blog/doctrine2-batch-processing > My command has used less memory, and took more time to exceed php > memory limit, but there was still some "memory leaks". > > I then discovered that it was the SQLLogger keeping all the queries in > memory that was causing those leaks. > > Commands are run in prod env by default but have debug enabled, it's > different than the app.php that is prod but where debug is > disabled ... > > So using "php app/console xxx:xxx --no-debug" fixed the leaks because > there was no more SQLLogger. > > An other solution was to use inside my Command: > $configuration = $this->em->getConnection()->getConfiguration(); > $configuration->setSQLLogger(null); > > > So my question is : Is there any way to limit the memory used by the > logger ? Or disabling the logger is the best solution ? > > Thanks > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony developers" group. > To post to this group, send email to symfony-devs@googlegroups.com > To unsubscribe from this group, send email to > symfony-devs+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-devs?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to symfony-devs@googlegroups.com To unsubscribe from this group, send email to symfony-devs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en