On one of my PHP applications I get Allowed memory size exhausted error.
What did i done wrong to get that error?
It’s showing on pages where i use more-less usual cakephp methods like ‘find’, to select record from database table, on index (list) pages.
How can i fix that? problem is that i can not set memory size on commercial servers….
Thank you in advance!
Research the ‘Containable’ behavior for your models. It’s a core behavior, and it sounds like you need to add it to your finds, to limit the amount of data they’re pulling back. Also, start looking at replacing finds with custom queries to speed things up and further limit the amount of data being returned.