Project

General

Profile

Actions

Bug #20329

closed

cache_hash fills up with huge amounts of MENUDATA

Added by Steffen Gebert about 15 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-04-21
Due date:
% Done:

0%

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

Description

The table cache_hash fills up with huge amounts of data with ident MENUDATA (size: 2.2gig).

Discussion in dev-list: http://lists.typo3.org/pipermail/typo3-dev/2009-April/034730.html , http://lists.typo3.org/pipermail/typo3-dev/2010-April/039736.html
(issue imported from #M10944)


Files

20101020_RFC_10944.diff (8.29 KB) 20101020_RFC_10944.diff Administrator Admin, 2010-10-20 19:54

Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #17187: cache_hash gets filled up with menudata entries while using TMENU_LAYERSRejectedPatrick Broens2007-04-04

Actions
Related to TYPO3 Core - Bug #22190: HMENU with IFSUB, CURIFSUB and hidden subpagesClosed2010-02-25

Actions
Related to TYPO3 Core - Bug #21388: typo3temp got filled with thousands of javascript_* filesRejected2009-10-28

Actions
Related to TYPO3 Core - Bug #98964: Menu object caching creates too many records resulting in huge cache_hash tableClosed2022-11-01

Actions
Actions #1

Updated by Patrick Broens about 15 years ago

Hi Steffen,

Could you please provide if you're using the calendar base (cal) extension? This might be related to cal. The discussion you are referring to also mentions this. If so, which version are you using?

Actions #2

Updated by Clemens Riccabona over 14 years ago

I can confirm this, again and again and again, now on typo3 4.2.8, with a 2-level TMENU_LAYERS.
OS: openSuSE 11.0, PHP 5.2.9, MySQL 5.x, apache 2.x

I am NOT using cal extension anywhere.

But probably it could be any other extension causing this really anoying bug!

(website has 8 languages, lots of pages and about 2k users a day, which is not that much IMO. ;) )

Actions #3

Updated by Clemens Riccabona over 14 years ago

this is, btw, a duplicate to #17187

Actions #4

Updated by Steffen Gebert over 14 years ago

Sorry for not responding, but notification mails didn't work for the last months.

No, I also don't use cal.

Actions #5

Updated by Juergen Weber about 14 years ago

Hey guys, we're encountering the very same problem for ages now. Isn't there any solution to this yet? This slows down our whole system and we're forced to implement cronjobs to clear the cache table on a regular basis. It would be great if you could raise the priority on this.

Actions #6

Updated by Steffen Gebert about 14 years ago

Our table currently contains >322,000 MENUDATA records, so yes.. this is quite ugly. I try to have a look after I finished the whole skinning work - hopefully the next days...

Actions #7

Updated by Patrick Broens about 14 years ago

Hi,

Ok, I had to inform you about the status.

After the T3BOARD10 I did a lot of investigation regarding this topic and posted the outcome of this investigation to the other core team members. Currently there is no simple solution. The outcome of this investigation was we need to rewrite the whole tslib_menu. As this is a major task, I asked to the other core team members to discuss this during the meeting we have in front of the T3DD10 and see if we can find a good solution. We need to have the views of multiple people, simply because this is pretty complicated stuff to solve.

We already agreed this task was too late and too complicated to get into 4.4.
I'll post my outcome on the dev mailinglist as well, so you know what exactly is going on.

Actions #8

Updated by Patrick Broens about 14 years ago

Posted the outcome of my investigation to the dev mailing list

Subject: MENUDATA caching problems

Actions #9

Updated by Patrick Broens over 13 years ago

I've uploaded a patch which is the first attempt to get rid of these huge amounts of menudata.

In this patch the caching framework is not taken into account, so if you want to test it, you need to turn this off.

Install the patch, go to the install tool and compare the database. You will see it tries to add two new tables, "cache_menu" and "cache_menu_mm".

If you read my outcome on the dev mailing list, you will probably know there are a few major issues, concerning the MENUDATA caching.
- MENUDATA entries were never deleted while changing page properties
- MENUDATA causes huge database tables
- MENUDATA is not state aware

The second one was my first concern. When using ExpAll = 1 in a HMENU, all the levels on all pages got an entry in the cache_hash table, with quite some data in the "content" field, which was in most of the cases redundant. The fix does not get rid of the huge amount of records, actually you will probably get more, because the caching is not done by level anymore but by menu item, especially in the "cache_menu_mm" table, but these are very small records. The "content" part in "cache_menu" is not redundant anymore.

Also the first problem has been fixed. The "cache_menu_mm" table contains a column "link_page", which holds the page id of the menuitem for the page it was created. When changing page properties in the backend, the records will be cleared with the same functionality which clears the page cache.

This also makes it possible to have some kind of state awareness, although changing page properties does not clear all pages in the rootline. For most of the menu's you should clear the cache for ALL pages, which is not recommended.

The patch is still in a rough state. Please post your findings and comments because it will help finding a solution for a problem which is in the TYPO3 core for a very long time.

Actions #10

Updated by Patrick Broens over 13 years ago

One of the things I'm currently thinking of is using an INSERT statement with multiple VALUES lists to insert several rows at a time. This is considerably faster (many times faster in some cases) than using separate single-row INSERT statements.

Work in progress ;-)

Actions #11

Updated by Patrick Broens over 13 years ago

And a question to you all: Currently the functions storeMenuHash() and getMenuHash() are in t3lib_page, simply because the storeHash() and getHash() for the "cache_hash" table was there as well. But because both functions are related only to the menu caching, IMHO it makes sense to move them to tslib_menu.

What is your opinion?

Actions #12

Updated by Steffen Kamper over 13 years ago

if they are only used by menu they should be moved. if it's worth to use it at other places we could create an own class for these kind of function. Eg i always was unhappy for clearing cache to instantiate tcemain.

Will look to your patch these days to get an idea ;)

Actions #13

Updated by Thomas Deinhamer almost 13 years ago

Are there any updates on this? Is this already fixed in 4.5? I see some installations of us which have growing cache_hash tables with insane amounts of MENUITEM entries.

Thanks a lot for feedback!

Actions #14

Updated by Alexander Opitz almost 10 years ago

  • Description updated (diff)
  • Status changed from Accepted to Needs Feedback
  • Target version deleted (0)
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5.35 or 6.2.4)?

Actions #15

Updated by Clemens Riccabona almost 10 years ago

I did no deeper investigations on this topic anymore,
but I can tell you, that I did not stumble upon this issue since years.

This maybe is also caused by:

1. consistently using the 'cachingframework' in my LTS installations
2. consistently having the cachingframework garbage-collector task configured.

so from my point of view you may close this issue silently.

regards,

Clemens

Actions #16

Updated by Alexander Opitz almost 10 years ago

  • Status changed from Needs Feedback to Closed

Thanks for feedback.

Actions #17

Updated by Alexander Opitz almost 10 years ago

  • Assignee deleted (Patrick Broens)
Actions #18

Updated by Fedir RYKHTIK almost 10 years ago

The issue still persists on our sites in 4.5.
Looks like it's related to the case, when we have lot's of complex menus on the site.

Actions #19

Updated by Loek Hilgersom over 1 year ago

  • Related to Bug #98964: Menu object caching creates too many records resulting in huge cache_hash table added
Actions

Also available in: Atom PDF