Re: memory allocation issues
| From: | Alan Knowles | Date: | Tue, 21 Oct 2003 10:57:07 +0000 |
| Subject: | Re: memory allocation issues | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22872@lists.php.net to get a copy of this message | ||
This is a good point.. - should debug_backtrace be called all the time... Since dataobjects raises an error when it finishes each fetch.. It would get called alot.. if you are doing multiple queries..
Would it be better to disable backtracing by default, and turn it on using?
PEAR::setDebugBacktrace(1);
or something..
Thoughts????
Regards
Alan
Robert Janeczek wrote:
hi i use db_dataobject with html_quickform in my application. lately i realized, that memory exhaustion problem seems to show a little bit to often. on my mashine i have memory limit set to 8mb, appliation is rather medicore-complicated, but it does quite a lot of db queries (with help of dataobjects), but size of data transfered isn`t really big (some hundreds bytes per query). when there is a lot of queries php hangs because of memory limit. if found that it happens in PEAR.php - in line with call to debug_backtrace. i want to locate the problem, because it doesn`t seem that this error occurs when i turn off this backtrace call - so it`s not that application is running really low on memory with its normal work. i would like to know your opinion about this problem, where should i look for the cause? - db class misses some post-query clean up? - db_dataobjects misses - || - ? - debug_bactrace does some really complicated work with memory before it produces return value? - php memory manager sleeps to much before automatic clean up? (connected with 2 first points from above) i know i could raise the memory limit, but i think that it maybe can be fixed without it - i find php a little bit to wasteful with memory, maybe complicated scripts (like pear classes) should do their own unset`s? rash-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com