Project:Node Hierarchy
Version:6.x-2.x-dev
Component:Drupal/PHP Code
Category:bug report
Priority:major
Assigned:Mark Carver
Status:closed (fixed)

Issue Summary

HI

My site was working fine with the older version, Today I have updated to 6.x-2.x-dev and got this Error on modules, views, status and most of the other pages.

none of the changes made except the upgrade to this version.

Please have a look into this.

Thanks
Vinoth

Comments

#1

#2

Project:Node Hierarchy» Drupal core
Version:6.x-2.x-dev» 6.13
Component:Code» menu system

HI

My memory limit is 256MB.

Yesterday I got "Allowed memory size of 268435456 bytes exhausted (tried to allocate 12788583 bytes)" this error on most of the pages,

Yesterday I upgraded the Node Hierarchy module dev. version, so I thought it may be bug of that module, after hours of investigation I can't find why it is.

So I tried the same DB backup from local machine WITHOUT ANY modules installed, (deleted sites/all/modules folder)

and got the same error!!!

but found the line number 734 on bootstrap.inc which is function check_plain($text) {..

after printing each $text i got very big update query "MySQL server has gone away query: UPDATE cache_menu SET data = 'a:2:{s:4:\"tree\";a:9458:...."

which is updating menu_links table to cache. (my menu_links table has nearly 9849 rows)

Please let me know how to move forward, or any patch?

is it really a Drupal Bug?

Thanks
Vinoth

#3

any advise?

#4

Project:Drupal core» Node Hierarchy
Version:6.13» 6.x-2.x-dev
Component:menu system» Code

I Got it.
it is because of Node Hierarchy module only,

in nodehierarchy.install module function nodehierarchy_update_6200() {

he adding all node as menus to menu_links which is totally causing memory limit Error...

He would find any other solution for automatic menu creation logic such as how book module maintains the menu.

I deleted all custom menu rows of nodehierarchy.module

"delete FROM `menu_links` where module = 'nodehierarchy'"

Vinoth

#5

Thanks Vinoth. That really helped me out. Please note that if you uninstall the module, it does not delete the entries!! You must manually delete them all using Vinoth's query.

Ouch. This bug was very frustrating--particularly when I still had the error after uninstall.

#6

Status:active» needs review

This patch solves the problem in #4 and #5

AttachmentSize
nh_uninstall_menus.patch 719 bytes

#7

Priority:critical» major

#8

Has this been resolved? Does the new 2.0 release fix this problem for you?

#9

Component:Code» Documentation
Status:needs review» reviewed & tested by the community

2.0 caused the problem for me, and nearly killed the site. The patch in 6 works and needs committing asap.

For us this manifested as 'max_packet_size' exceeded error for MySQL when trying to insert/get the cache_menu table. Manually deleting the extra menu table entries solved it - thanks vinoth.3v!

#10

Status:reviewed & tested by the community» needs work

I am a little confused. If you are trying to upgrade NH, why are you uninstalling? The patch in #6 is only called when you uninstall NH... and the table should really be removed in nodehierarchy_update_6200 after all the data is migrated.

On a second note, both max_packet_size in MySQL and the memory_limit in PHP are simple configurations which can easily be increased.

In any case, what this all sounds like is that you have a lot of {menu_link} or {nodehierarchy} entries and your server is simply croaking before it can finish.

Should we implement the Batch API to better handle db queries?

#11

Title:Allowed memory size of 268435456 bytes exhausted (tried to allocate 12788583 bytes)» 6.x-1.x -> 6.x-2.x Upgrade Path
Component:Documentation» Drupal/PHP Code
Assigned to:Anonymous» Mark Carver

#12

Ok, apologies Mark - I assumed the patch in #5 WAS the SQL fix from #4. Naughty!

But the issue stands as described: Site perfectly was functional; updated NH and ran update.php; suddenly there's MySQL complaints at the top of every page about max_packet_size being exceeded when writing cache_menu table...

I executed delete from `menu_links` where module = 'nodehierarchy' and ~950 menu_links rows were deleted... the SQL errors disappeared and the site is back to normal.

And no, one cannot update max_packet_size on shared hosting - we're fixed at 1Mb, which should be ample for this small site (~2000 nodes, 600 users).

#13

Did you run the query before you ran nodehierarchy_update_6200? And did your menu/parent/child info stay intact?

#14

Status:needs work» fixed

The first half of this issue evolved into the bug of not removing the nodehierarchy table during uninstall. That was patched as part of #955148: 6.x-2.0 Roadmap . If the 'menu_links' nodehierarchy is still a problem (and, at first glance, that seems like a weird problem), please open a new issue.

#15

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here