Posted by kenorb on January 13, 2009 at 1:25am
4 followers
| Project: | Content Construction Kit (CCK) |
| Version: | 6.x-2.1 |
| Component: | content.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (works as designed) |
Issue Summary
When I'm going to admin/build/modules page my MySQL dies (it's freezing down loading of admin/build/modules page and the list of module is unreadable) and there is error user warning: Got a packet bigger than 'max_allowed_packet'.
After some investigation and searching some information about it, the only things which are repeating all the time are following lines from cck:
user warning: Got a packet bigger than 'max_allowed_packet' bytes query: UPDATE cache_menu SET data = '
(some other stuff)
(below CCK staff)
(1 record)
a:26:{s:5:\"title\"; s:10:\"Edit group\"; s:13:\"page callback\"; s:15:\"drupal_get_form\"; s:14:\"page arguments\"; a:3:{i:0; s:23:\"fieldgroup_remove_group\"; i:1; s:6:\"apteka\"; i:2; i:5;}s:16:\"access arguments\"; a:1:{i:0; s:24:\"administer content types\";}s:4:\"type\"; i:4; s:6:\"module\"; s:10:\"fieldgroup\"; s:14:\"load_functions\"; s:12:\"a:1:{i:5; N;}\"; s:16:\"to_arg_functions\"; s:0:\"\"; s:6:\"weight\"; i:0; s:13:\"_number_parts\"; i:7; s:6:\"_parts\"; a:7:{i:0; s:5:\"admin\"; i:1; s:7:\"content\"; i:2; s:9:\"node-type\"; i:3; s:6:\"apteka\"; i:4; s:6:\"groups\"; i:5; s:1:\"%\"; i:6; s:6:\"remove\";}s:4:\"_fit\"; i:125; s:8:\"_visible\"; b:1; s:4:\"_tab\"; b:0; s:10:\"tab_parent\"; s:0:\"\"; s:8:\"tab_root\"; s:46:\"admin/content/node-type/apteka/groups/%/remove\"; s:15:\"access callback\"; s:11:\"user_access\"; s:14:\"block callback\"; s:0:\"\"; s:15:\"title arguments\"; a:0:{}s:14:\"title callback\"; s:1:\"t\"; s:11:\"description\"; s:0:\"\"; s:8:\"position\"; s:0:\"\"; s:4:\"path\"; s:46:\"admin/content/node-type/apteka/groups/%/remove\"; s:4:\"file\"; s:0:\"\"; s:9:\"file path\"; s:0:\"\"; s:12:\"include file\"; s:0:\"\";}s:47:\"admin/content/node-type/artykul/groups/%/remove\";
(2nd record)
a:26:{s:5:\"title\"; s:10:\"Edit group\"; s:13:\"page callback\"; s:15:\"drupal_get_form\"; s:14:\"page arguments\"; a:3:{i:0; s:23:\"fieldgroup_remove_group\"; i:1; s:7:\"artykul\"; i:2; i:5;}s:16:\"access arguments\"; a:1:{i:0; s:24:\"administer content types\";}s:4:\"type\"; i:4; s:6:\"module\"; s:10:\"fieldgroup\"; s:14:\"load_functions\"; s:12:\"a:1:{i:5; N;}\"; s:16:\"to_arg_functions\"; s:0:\"\"; s:6:\"weight\"; i:0; s:13:\"_number_parts\"; i:7; s:6:\"_parts\"; a:7:{i:0; s:5:\"admin\"; i:1; s:7:\"content\"; i:2; s:9:\"node-type\"; i:3; s:7:\"artykul\"; i:4; s:6:\"groups\"; i:5; s:1:\"%\"; i:6; s:6:\"remove\";}s:4:\"_fit\"; i:125; s:8:\"_visible\"; b:1; s:4:\"_tab\"; b:0; s:10:\"tab_parent\"; s:0:\"\"; s:8:\"tab_root\"; s:47:\"admin/content/node-type/artykul/groups/%/remove\"; s:15:\"access callback\"; s:11:\"user_access\"; s:14:\"block callback\"; s:0:\"\"; s:15:\"title arguments\"; a:0:{}s:14:\"title callback\"; s:1:\"t\"; s:11:\"description\"; s:0:\"\"; s:8:\"position\"; s:0:\"\"; s:4:\"path\"; s:47:\"admin/content/node-type/artykul/groups/%/remove\"; s:4:\"file\"; s:0:\"\"; s:9:\"file path\"; s:0:\"\"; s:12:\"include file\"; s:0:\"\";}s:49:\"admin/content/node-type/dyskoteka/groups/%/remove\";
(etc.)
(SUMMARY = 22 arrays similar to above (with ending groups/%/remove) = around 25000 bytes)
(stuff continue...)
(1st line of other cck stuff)
a:26:{s:5:\"title\"; s:12:\"Remove field\"; s:13:\"page callback\"; s:15:\"drupal_get_form\"; s:14:\"page arguments\"; a:3:{i:0; s:25:\"content_field_remove_form\"; i:1; s:6:\"apteka\"; i:2; s:11:\"field_email\";}s:16:\"access arguments\"; a:1:{i:0; s:24:\"administer content types\";}s:4:\"file\"; s:26:\"includes/content.admin.inc\"; s:4:\"type\"; i:4; s:6:\"module\"; s:7:\"content\"; s:14:\"load_functions\"; s:0:\"\"; s:16:\"to_arg_functions\"; s:0:\"\"; s:6:\"weight\"; i:0; s:13:\"_number_parts\"; i:7; s:6:\"_parts\"; a:7:{i:0; s:5:\"admin\"; i:1; s:7:\"content\"; i:2; s:9:\"node-type\"; i:3; s:6:\"apteka\"; i:4; s:6:\"fields\"; i:5; s:11:\"field_email\"; i:6; s:6:\"remove\";}s:4:\"_fit\"; i:127; s:8:\"_visible\"; b:1; s:4:\"_tab\"; b:0; s:10:\"tab_parent\"; s:0:\"\"; s:8:\"tab_root\"; s:56:\"admin/content/node-type/apteka/fields/field_email/remove\"; s:15:\"access callback\"; s:11:\"user_access\"; s:14:\"block callback\"; s:0:\"\"; s:15:\"title arguments\"; a:0:{}s:14:\"title callback\"; s:1:\"t\"; s:11:\"description\"; s:0:\"\"; s:8:\"position\"; s:0:\"\"; s:4:\"path\"; s:56:\"admin/content/node-type/apteka/fields/field_email/remove\"; s:9:\"file path\"; s:0:\"\"; s:12:\"include file\"; s:62:\"sites/all/modules/contributions/cck/includes/content.admin.inc\";}s:55:\"admin/content/node-type/apteka/fields/field_link/remove\";
(2nd line)
a:26:{s:5:\"title\"; s:12:\"Remove field\"; s:13:\"page callback\"; s:15:\"drupal_get_form\"; s:14:\"page arguments\"; a:3:{i:0; s:25:\"content_field_remove_form\"; i:1; s:6:\"apteka\"; i:2; s:10:\"field_link\";}s:16:\"access arguments\"; a:1:{i:0; s:24:\"administer content types\";}s:4:\"file\"; s:26:\"includes/content.admin.inc\"; s:4:\"type\"; i:4; s:6:\"module\"; s:7:\"content\"; s:14:\"load_functions\"; s:0:\"\"; s:16:\"to_arg_functions\"; s:0:\"\"; s:6:\"weight\"; i:0; s:13:\"_number_parts\"; i:7; s:6:\"_parts\"; a:7:{i:0; s:5:\"admin\"; i:1; s:7:\"content\"; i:2; s:9:\"node-type\"; i:3; s:6:\"apteka\"; i:4; s:6:\"fields\"; i:5; s:10:\"field_link\"; i:6; s:6:\"remove\";}s:4:\"_fit\"; i:127; s:8:\"_visible\"; b:1; s:4:\"_tab\"; b:0; s:10:\"tab_parent\"; s:0:\"\"; s:8:\"tab_root\"; s:55:\"admin/content/node-type/apteka/fields/field_link/remove\"; s:15:\"access callback\"; s:11:\"user_access\"; s:14:\"block callback\"; s:0:\"\"; s:15:\"title arguments\"; a:0:{}s:14:\"title callback\"; s:1:\"t\"; s:11:\"description\"; s:0:\"\"; s:8:\"position\"; s:0:\"\"; s:4:\"path\"; s:55:\"admin/content/node-type/apteka/fields/field_link/remove\"; s:9:\"file path\"; s:0:\"\"; s:12:\"include file\"; s:62:\"sites/all/modules/contributions/cck/includes/content.admin.inc\";}s:64:\"admin/content/node-type/apteka/fields/field_opening_hours/remove\";
(SUMMARY = 40 arrays similar to above (with ending /remove) = around 55000 bytes)
}', created = 1231798510, expire = 0, headers = '', serialized = 1 WHERE cid = 'router:' in /home/sites/p/public_html/includes/cache.inc on line 109.Question: If it's really necessary to generate those records each time when I'm going to admin/build/modules?
Problem: My genius hosting provider (HeartSomething) have hardcoded `max_allowed_packet` limit to 1MB and it "can't" be changed!
How it can be optimized?
Comments
#1
Some similar topics:
#121390: Many CCK fields and using views causing max_allowed_packet errors with MySQL query "UPDATE cache"
#218187: Views cache too large
#316078: Packet too large error
#317775: Caching entire {menu_router} table causes MySQL error/slow rebuilds and slows menu_link_save
http://drupal.org/node/253386
http://drupal.org/node/341684
http://drupal.org/node/220717
http://drupal.org/node/198267
http://drupal.org/node/321210
http://drupal.org/node/75400
Here there are some patches related to similar views issue, some solution can be consider:
#121390: Many CCK fields and using views causing max_allowed_packet errors with MySQL query "UPDATE cache"
There is some solution:
#321154: can I disable cache_menu? how?
but disabling menu cache is not solving the problem.
Dump of this packet in attachment in the next post.
#2
#3
Possible solution:
http://drupal.org/node/321154#comment-1204121
#321154: can I disable cache_menu? how?
#4
I'm sorry but this is not a bug for CCK. CCK uses the regular menu concepts and constructs provided by drupal core.
There's nothing CCK can specifically do about this, or about the fact that your host hardcodes `max_allowed_packet`to 1MB
#5
Solution:
This one can help #361967: Increase MAX_JOIN_SIZE and MAX_ALLOWED_PACKET settings in system.install
Or just change your cache to APC/memcache or install http://www.drupal.org/project/fastpath_fscache
#6
I had this issue also on my local MAMP setup.
Everytime that I changed the my.cnf nothing would happen
1. I took a look at the logs and it read
090617 11:29:26 mysqld started
Warning: World-writable config file '/Applications/MAMP/Library/my.cnf' is ignored
so at prompt > chmod 775 my.cnf
2. make sure that you haven't added any other variables to the my.cnf file that might not be defined
#7
For making adjustments to this in a local MAMP Pro setup do the following:
1. In MAMP go to File > Edit Template > Mysql my.cnf.
2. Increase the max_allowed_packet.
3. Restart the servers.
I started by going from 1M to 2M and it seemed to be enough of an increase.