Hello,

I try to save a large number of records with Cake (latest stable 1.2
branch) but script stops with fatal error because of memory exhausted.
I have about 30000 records that must be stored in mysql. I use $Model-
>saveAll($data, array('validate'=>true, 'atomic'=>true)), but even
with 1024MB memory limit, script fails. I've tried to save each record
with loop and $Model->save($data) instead of $Model->saveAll(), but
this makes no difference. Disabling validation makes the trick though.
When records are not validated script consumes (almost) constant
amount of memory, in contrast to case when data is validated then on
every loop iteration memory consumption grows (I measure memory with
memory_get_usage()).

Any ideas how to solve this?
Thanks!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en

Reply via email to