Wednesday, January 5, 2011

Re: memory allocation- no pages will load

On Jan 5, 2:35 am, roundrightfarm <roundrightf...@gmail.com> wrote:
> Would this explain why a even a static page will not load?  Literally
> none of my pages would load.
>
> Actually, the problem fixed itself, with me doing nothing.  I first
> encountered the problem, walked away for about 2 hours, came back, the
> problem was still there.  I posted on the forum, then came back 1/2
> hour later to your reply and the pages were loading again.

That means you haven't fixed it (assuming you didn't change any of
your code) and it's going to happen again.

>
> I know nothing about how memory gets allocated, but it is as if the
> memory was locked up somewhere for a while and then released.  I
> assumed rebooting the computer would reset any funky memory
> allocation, so I was surprised when a reboot did not work
> immediately.

Your problem is that a php script (index.php) starts consuming 0bytes
of memory and consumed memory until it ran out and spat out that
memory. It's nothing to do with memory allocation or memory not being
freed etc. and everything to do with somewhere in the code there being
an infinite loop OR simply a large amount of data.

A good place to start looking is the line of code generating the
message:

Allowed memory size of 134217728 bytes exhausted (tried
to allocate 35 bytes) in ***/Applications/XAMPP/xamppfiles/htdocs/
cake/
libs/cache/file.php*** on line 176.

The line generating the error is not where the error will be, but if
you put debug(Debugger::trace()); in there - you'll probably notice
that it's somewhere/somehow in a loop OR you're trying to cache (if
cache is in there anywhere) a huge amount of data (which could be data
with a recursive reference in it).

An xdebug profile would also help you solve or at least identify the
problem very quickly.

AD

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: