On 10/20/06, leo.cacheux <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have a (quite big) request in my Cake application. When I call it one
> time, it works fine, but I have to call it many times in a loop to fill
> many arrays, and I get this error :
>
> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
> allocate 1024 bytes) in
> /appli/projects/fluidit/apache_2.0.59/htdocs/fluidit/cake/libs/model/datasources/dbo_source.php
> on line 308
>

Hi Leo,

This is definitely a PHP error.  I run into it all the time time when
I try to load too much information from a database into memory. :)

> I don't know if this is a MySQL or a PHP error. The 8388608 bytes
> correspond to some buffer variables in the MySQL configuration so it
> seems to come from here, but I might be wrong.
> I can't change the MySQL or PHP config, so I'd like to "split" the
> requests in many parts to avoid this problem. If the error come from
> MySQL, I could execute each request in a different connexion, and if it
> come from PHP, maybe render a first part of the data, then execute the
> next request, then render again...
> How could I do this with Cake ?

This is just my opinion, but this isn't really a Cake issue. This is
more a code-and-query-optimizing issue.   I would invest some time in
seeing if you can't get MySQL to do the bulk of the work before you
start loading up arrays with large amounts of data.

Hope that helps.

-- 
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to