Drupal 6.14
Domain Access 2.0
My node hierarchy has several hundred nodes structured 3-4 levels deep. When I visit pages that contain a drop-down element showing the node hierarchy (for example, edit content type page, or edit node page of a node in this hierarchy and with the hierarchy drop down), they take several minutes to load.
I've found that in nodehierarchy.module, there is a function called _nodehierarchy_get_parent_pulldown_items(). Browsing my MySQL query log for just the edit content type page, I see that this function executes (roughly) the same query several hundred times.
When you enable the Domain Access module, it rewrites all queries hitting the {node} table to also do an INNER JOIN on the {domain_access} table. Multiply this new JOINed query by a few hundred times and the mysqld tasks eats up 99% CPU for several minutes, bringing everything to a crawl.
I'm listing this issue with the NA module since it's the one that executes the vast number of queries in the first place.
Cheers,
Yuriy
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | queries(devel module query info block).zip | 1.22 MB | adnanhader |
Comments
Comment #1
markhalliwellCopy & Pasted: This issue pertains to the 6.x-1.x branch which is now legacy and is over one year old. If this issue is not applicable anymore, please consider closing it. Otherwise, please update this issue appropriately. Will be closed in two weeks if no response.
Comment #2
adnanhader commentedI am facing the same problem as described above. i have almost 50k+ nodes structured using node hierarchy, 3-levels of parent child relationship. it takes more than 1 minute to view children of a node. it becomes even worse when try to add a new node or edit an existing node. sometimes MySQL server gone away and site become offline and available again after sometime. i tried to optimize MySQL server, increase resources using my.cnf file. convert key tables to InnoDB without any significant improvement in performance. I exactly don't know why site behave like this.
Note: I am not using Domain Access module in my project.
I can provide more details if asked.
Thanks,
Adnan
Comment #3
adnanhader commentedI am attaching query info report. may be it helps to understand the issue. As a quick fix i go to menu.inc file and comment query and loop in menu_tree_check_access function (line#1007 to line#1013). it drastically improve the page load time. but I don't know the consequences of disabling this query and also don't want to make any change in core. Please help me to fix the issue. any tips and suggestions are welcomed with thanks.
Adnan
Comment #4
bpadaria commentedHaving this issue with Drupal 7 as well.