Like I said, it's a php garbage collection problem, i was getting one record at a time, and when I got up to 15,000 itterations it died out of memory, and memory was set at 1GB. If I remember there was a fix submitted to the php dev group. I thought I heard rumor the fix would be released with 5.3, but then I heard it wasn't being released in 5.3, so I have no idea what's going on, so I just don't do large queries in Symfony with propel.
James On Nov 14, 2008, at 12:37 AM, Sumedh wrote: > > Thanks guys... > > Actually, the queries that are getting fired are selecting only around > 500 rows at a time...not a lot you would agree... > > and the loop runs for about 500 times... > > I am unsetting the resultset and the array in every iteration... > > but for every iteration of the loop the memory consumption goes on > increasing... :( > > It works ok if I increase the memory limit from 24M to 48M as the loop > completes at about 34MB memory for current data set... > > On Nov 14, 4:06 am, James <[EMAIL PROTECTED]> wrote: >> This is actually a problem with php object garbage collection (or >> lack >> there of), and poor garbage collection in propel. There is no way >> around it with propel. I was trying it and we ended up writing a >> script out of plain plain php to get around it. We had tried >> modifying our base propel object but that only got us so far. >> >> James >> >> On Nov 12, 2008, at 1:14 PM, Ant Cunningham wrote: >> >> >> >>> first thin i would try if you havent already is using doSelectRS, >>> then >>> hydrating and destroying the objects one at a time as you use them >>> instead of hydrating them all with doSelect or what have you. If >>> youve >>> already done this i dunno aside from maybe doing it with pdo/creole >>> only. >> >>> On Nov 12, 6:35 am, Sumedh <[EMAIL PROTECTED]> wrote: >>>> Hi Friends, >> >>>> I am getting a out of memory error in a batch script. >> >>>> 1. I am using Symfony 1.0 on PHP 5.1.2 >> >>>> 2. I am fetching some data from table1, doing some calculations >>>> (average, standard deviation etc.) and storing it in table2. >> >>>> 3. There are no circular references as far as I can see. >> >>>> 4. I tried using unset() on all possible places for arrays and >>>> resultsets I am using, but the memory allocation goes on increasing >>>> monotonically. >> >>>> 5. My PHP memory setting is 24MB which should be enough, as the >>>> data >>>> set is not very large. In one loop, I am handling only thousands of >>>> records, not hundreds of thousands. >> >>>> Does it have something to do with Propel? Can I call some method to >>>> release memory after every loop? >> >>>> - Sumedh > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
