[symfony-users] Re: Doctrine memory leak in simple insert loop

2009-01-13 Thread Jonathan Wage
I think the reason with Propel is because it doesn't use cyclic references as much as Doctrine does. - Jon On Tue, Jan 13, 2009 at 8:45 AM, Tom Boutell wrote: > > On Jan 12, 12:48 pm, "Guilherme Blanco" > wrote: > > Just for your tries... > > > > $obj->save(); > > $obj->free(); > > unset($obj)

[symfony-users] Re: Doctrine memory leak in simple insert loop

2009-01-13 Thread Guilherme Blanco
Yes, I forgot to notice that on email. Just remember that if you're using shared objects it may be dangerous... since you remove the object from identity map. Regards, On Tue, Jan 13, 2009 at 12:45 PM, Tom Boutell wrote: > > On Jan 12, 12:48 pm, "Guilherme Blanco" > wrote: >> Just for your tri

[symfony-users] Re: Doctrine memory leak in simple insert loop

2009-01-13 Thread Tom Boutell
On Jan 12, 12:48 pm, "Guilherme Blanco" wrote: > Just for your tries... > > $obj->save(); > $obj->free(); > unset($obj); Thanks! This did the job for me. I see that free() can take a boolean parameter indicating you want it to free relations as well, that's important to remember if you're not si

[symfony-users] Re: Doctrine memory leak in simple insert loop

2009-01-12 Thread Jonathan Wage
Ya unfortunately their is nothing we can do about it :( It has been a topic of discussion for a long time. - Jon On Mon, Jan 12, 2009 at 11:48 AM, Guilherme Blanco < guilhermebla...@gmail.com> wrote: > Just for your tries... > > $obj->save(); > $obj->free(); > unset($obj); > > The free method do

[symfony-users] Re: Doctrine memory leak in simple insert loop

2009-01-12 Thread Guilherme Blanco
Just for your tries... $obj->save(); $obj->free(); unset($obj); The free method does a lot of unsets, which may help you a little bit. Regards, On Mon, Jan 12, 2009 at 3:45 PM, Tom Boutell wrote: > > One last note to follow through: I tried my Propel version of the same > code in a straight Pr

[symfony-users] Re: Doctrine memory leak in simple insert loop

2009-01-12 Thread Tom Boutell
One last note to follow through: I tried my Propel version of the same code in a straight Propel 1.3 project with Symfony not in the picture at all, and I got the same memory leak. Propel 1.3's 'clearAllReferences' method does not help. So both Propel 1.3 and Doctrine have the same issue: they us

[symfony-users] Re: Doctrine memory leak in simple insert loop

2009-01-12 Thread Tom Boutell
I hit send a little early on that. I did sort out how to make a 1.0 batch script work in 1.2. Batch versus task makes no difference, it's looking like a real difference in memory leak behavior between Propel 1.2 and Propel 1.3. This is odd because Propel 1.3 has an explicit clearAllReferences() m

[symfony-users] Re: Doctrine memory leak in simple insert loop

2009-01-12 Thread Fabien Potencier
If you have the same problem with both Propel 1.3 and Doctrine 1.0, the problem must be with PDO. -- Fabien Potencier Sensio CEO - symfony lead developer sensiolabs.com | symfony-project.com | aide-de-camp.org Tél: +33 1 40 99 80 80 Tom Boutell wrote: > On Jan 11, 5:56 pm, "Jonathan Wage" wro

[symfony-users] Re: Doctrine memory leak in simple insert loop

2009-01-12 Thread Tom Boutell
On Jan 11, 5:56 pm, "Jonathan Wage" wrote: > This is not a problem with Doctrine, it is a problem with PHP and objects. > It was fixed in php 5.3 > > http://bugs.php.net/bug.php?id=33595 > > - Jon > Thanks for the quick response. I've done more testing. We can do this with Propel 1.2 in a Symfo

[symfony-users] Re: Doctrine memory leak in simple insert loop

2009-01-11 Thread Jonathan Wage
This is not a problem with Doctrine, it is a problem with PHP and objects. It was fixed in php 5.3 http://bugs.php.net/bug.php?id=33595 - Jon On Sun, Jan 11, 2009 at 4:40 PM, Tom Boutell wrote: > > I've written a Symfony task which executes this simple loop: > >while (($line = fgetcsv($in)