In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0000316 [In-Portal CMS] Front End bug report always 2009-09-22 15:44 2009-09-23 11:15
Reporter alex View Status public Project Name In-Portal CMS
Assigned To Developer
Priority normal Resolution open Fixed in Version
Status active Product Version 5.0.0 Target Version Icebox
Time EstimateNo estimate
Summary 0000316: MySQL error "Got a packet bigger than 'max_allowed_packet'" during st_CachedMenu call with 3000 categories
Description I got MySQL error "Got a packet bigger than 'max_allowed_packet'", when site menu is printed on Front-End via st_CacheMenu tag.

Problem happens because serialized value of "cms_menu" variable in Cache table is larger, then allowed packet size in MySQL and that was 2MB in my case. To solve this I propose to do the following:

1. Add DataType (with index) column to Cache table.
2. Define DataType for each record in table and use it in future when writing data to this table.
3. Instead of writing one "cms_menu" variable we should write a set of variables named "cms_menu_1", "cms_menu_2", "cms_menu_3" and so on with common DataType of "cms_menu".
4. each of "cms_menu_*" variables will contain part of total value of former "cms_menu" variable.

When used, then instead of:
SELECT Data
FROM Cache
WHERE VarName = 'cms_menu';

we should use:
SELECT Data, VarName
FROM Cache
WHERE DataType = 'cms_menu';

Then in PHP sort retrieved data by VarName, join them into one string and then unserialize.
Additional Information Also we could develop central methods for writing/reading to Cache table, that will automatically perform data splitting by multiple variable in case of strings larger, when max_allowed_packet limit is reached.

Because of Cache table is used for storing unit config cache, then moving these methods outside kApplication class will be near to impossible to implement, so they will stay in kApplication class. We could use setCache and getCache and add additional parameter $storage_type (default to memory) to help us.
Tags No tags attached.
Reference
Change Log Message
Estimate Points 0
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
User avatar (0000513)
alex (manager)
2009-09-23 11:15

Moving to "Future" because in most of analyzed MySQL servers "max_allowed_packet" is set to "32M" manually, but default value is "1M". Problem only is actual for websites with large amount of data, who will use dedicated hosting anyway.

- Issue History
Date Modified Username Field Change
2009-09-23 11:15 alex Note Added: 0000513
2009-09-23 11:15 alex Target Version 5.0.2 => Icebox
2009-09-22 15:44 alex Target Version => 5.0.2
2009-09-22 15:44 alex New Issue



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker