Project

General

Profile

Actions

Bug #20495

closed

function getByTag() in new caching framework runs out of memory

Added by Rupert Germann over 15 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-05-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I got a:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 27672 bytes) in /srv/SVN/forge.typo3.org/Core/trunk/t3lib/cache/frontend/class.t3lib_cache_frontend_variablefrontend.php on line 107

after I tried to open the cache section of the adminpanel.

Steps to reproduce:
I have a fully cached news singleview page with a huge amount of cached versions. The table cache_pages is ~ 300MB big and it has ~ 5000 entries 99% of them on that very single view page.
If I now try to open the cache section of the admpanel it calls extGetNumberOfCachedPages(). This function calls getByTag() from the new caching framework. getByTag() tries to read the complete cache_pages table to an array which is passed back to extGetNumberOfCachedPages() which counts the array entries to display the number of cached page versions.

in older TYPO3 versions this worked flawlessly with 10000s of pages.

in TYPO3 4.2.6 function extGetNumberOfCachedPages looks like this:

function extGetNumberOfCachedPages($page_id)    {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', 'cache_pages', 'page_id='.intval($page_id));
list($num) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
return $num;
}

I suggest to use this function again .

(issue imported from #M11175)


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #20864: Provide a method countByTag() for caching backendsClosedIngo Renner2009-08-11

Actions
Actions

Also available in: Atom PDF