Thank you, Dr. Loboto. Your solution appears to have helped me a lot! During a simple test, it did not report any memory leak.
As I've spent these few days running my applications, there has been no reports of any memory leak thus far. I truly appreciate the community at CakePHP! Thank you so much everyone! On Apr 11, 11:07 am, "Dr. Loboto" <[email protected]> wrote: > With debug < 2 and cacheQueries = false nothing is saved and this > source of "leaks" is eliminated. > > On Apr 9, 2:01 am, Ryan Schmidt <[email protected]> wrote: > > > > > > > > > On Apr 8, 2011, at 07:18, ProFire wrote: > > > > Well, whether it'smemoryleaks or not, I'm experiencing amemory > > > exhaustion. > > > The code would look like this: > > > > $memorySize = memory_get_usage();// X bytes > > > $this->model->save($this->data); > > > $memorySize = memory_get_usage();// X + 2000 bytes > > > $this->model->create(); > > > $memorySize = memory_get_usage();// X + 2000 bytes > > > > I ran this test a few times by putting it in a function and looping > > > it. > > > The results are pretty consistent. > > > Each Model::Save() increasesmemoryby about 2000 bytes. > > > Even after I call Model::Create(), thememorydoes not reduce. > > > > Is there a way to clear thememory? > > > Does anybody also experience a somewhat similar issue? where by each > > > Model::Save results in an increase ofmemory? > > > This topic has come up before; read this thread: > > >http://groups.google.com/group/cake-php/browse_thread/thread/3f4cfb80... > > > The guess there is that CakePHP saves the query (and/or information about > > it) somewhere inmemory, possibly for debugging purposes, and that CakePHP > > simply didn't expect you to be doing so many queries at once that this > > extra debugging information would exhaustmemory. Perhaps you can identify > > where in the core files this is happening ("look in dbo_source for > > cacheMethod"), and see if it can be reduced or eliminated. > > > Alternately, perhaps you can rewrite your process so it doesn't have to do > > so many queries in one request. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
