> Hi guys,
> I am having the hardest time with Zend framwork at the moment.
> All was well and my project was almost finished but while i was browsing
> through the application i got a mem size exhausted error on two pages.
> Both of these pages have default zend forms on them. I cant remember what
> changes where made so i cant step back and trace the error.
> So now i installed xdebug to get me going again but the trace file is 290 mb
> so i cant post it in here.
By trace, do you mean the cachegrind file?
What happens when you inspect it yourself?
Also, are you sure it's not DB related? E.g. somewhere else you're
already reading all records from a giant table into php? Most likely
somewhere before the error below.
The error below seems to be related to Zend_Db_Table setting up the
meta data. Depending on how many models (based on
Zend_Db_Table_Abstract) you have, that's a lot of legwork -- on each
Regarding the original memory error, the causes can be anywhere in your
application. The error occurs on the last bit of memory php tries to
allocate that is to big for the remaining memory resources. This can
even happen at different spots in the code, depending on how the memory
is allocated during execution.
Are you using code with memory leaks? Like an old mssql server extension
or PHPExcel component?
You may also try to increase the memory limit in php.ini. You seem to
have around 12M if I read it right, but you could set it to 512M for
example and see if you code will run on that.
Just my 2 cents.
Op 28-07-11 21:01, Andreas Möller schreef:
>> command line you can do: zf --show-version
> Or see /Zend/Version.php.
> Wow that are alot of replys :-)
> Anyway i am using version: 1.9.5
> And before everybody starts screaming about that, this project was handed to
> me and i knew (know even) nothing about zend framework.
> I meant a trace file but i also got an cachegrind file which is about 170mb
> I did an edit of php.ini to 512 mb but this still generates the problem.
> I am not using an mssql database but i do use the excel generator. But this
> is used on different parts of the application. I dont think that it has
> anything to do with it.
I cannot be sure of course, but what if you just turned off the excel
generator? I told you about PHPExcel, because I experienced a problem
like you are having with exactly that component. It is also possible to
watch your system performance using your systems monitoring feature, to
see the memory consumption increase while the script runs. Maybe that
can shed some light on what it happening. PHPExcel remains my best guess.
> I tried to use the " https://gist.github.com/628803 helper script for
> analyzing the output of a PHP xdebug code trace " But it outputs nothing :-(
> [root@web01 tmp]# php trace.php trace.2043925204.xt memory-own 20
> PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
> ( 2.26%)
> ( 5.12%)
> ( 7.54%)
> ( 9.95%)
> Showing the 20 most costly calls sorted by 'memory-own'.
> Inclusive Own
> function#calls time memory time memory
> [root@web01 tmp]#
> So what steps do i need to take? I think that i have written something that
> fills the global variable ($this) with alot of stuff, but well how do i hunt
> it down?
> View this message in context: http://zend-framework-community.634137.n4.nabble.com/Allowed-memory-size-exhausted-tp3701480p3703294.html > Sent from the Zend Framework mailing list archive at Nabble.com.