View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009001 | mantisbt | change log | public | 2008-03-24 16:38 | 2008-08-11 09:42 |
Reporter | murrayt5 | Assigned To | giallu | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.1.1 | ||||
Fixed in Version | 1.2.0a2 | ||||
Summary | 0009001: memory exhausted on changelog | ||||
Description | Viewing change log page I see a number of lines of text correctly showing the changes in our applications but then I have the following at the end: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4864 bytes) in /var/data/mantis/core/string_api.php(309) : runtime-created function on line 1 | ||||
Steps To Reproduce | I just click on the Change Log link and it occurs | ||||
Tags | No tags attached. | ||||
Is that the only page where the problem occur? In general, 8 MB is a little bit short as a memory limit, but the changelog should not be that memory intensive. |
|
It's the only page I've seen the error on so far. It doesn't seem to happen when I'm viewing the page under the anonymous user account, only when I'm logged in under my account (haven't checked other user accounts) and only if I have All Projects selected. |
|
This happens w/ the Official Mantis Bugtracker change log: |
|
This will be fixed once 0001910 is deployed as part of 1.2.x. We can probably optimize the memory usage of some of the pages, however, with the fix for 0001910, I think it is a lower priority. |
|
I also have a lot of issues (3500) and the change_log.php script cannot display them all, but I would really like to see change_log.php of past release. Something like a filter on N last releases or a multiple select would be useful. |
|
I downsized my php memory_limit from 32Mb (giving a working changelog) to 16Mb and can definitely confirm the issue. Since I'm learning how to use xdebug I'll try to see if there is an obvious offender; no promises though... |
|
It seems that the main reason we are running out of memory (apart from loading the whole core/*_api.php set...) is that we cache all the bug's data while we compose the page. Surely, reducing the scope of the changelog as proposed by plegall will help, but I'd prefer trying to improve the code so we don't break if someone has a large number of resolved issues in a single target version. Victor, any idea? |
|
Ideally our caches that are built into the core APIs should be limited to the last referenced N items (i.e. 50). Once we cache item 51, we should evict item 1 from the cache. Maybe its time to have some cache class that is re-used accross the different core APIs. This cache class should be useful with caching issues, issue notes, etc. |
|
That's surely a good idea (another tick on the list of things to be revamped...) in the meanwhile, I found out we can improve the situation (I can use again the changelog in 16MB) with the following:
|
|
Fixed by applying the proposed patch. The same was applied to roadmap |
|
MantisBT: master 189f54de 2008-04-21 18:45 Details Diff |
Fix 9001: memory exhausted on changelog. The bug data cache is dropped at each iteration so the memory consumption is lowered git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5190 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0009001 |
|
mod - core/custom_function_api.php | Diff File |