With this module enabled, the following error occurs (though sometimes the module is installed once the page is refreshed.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 30720 bytes) in /home/tmgadmin/public_html/drupal/sites/all/modules/views/modules/views_profile.inc on line 100

Once the module is enabled, the rebuild permissions script under Admin > Post Settings fails with a Fatal Memory Error as show below.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /home/tmgadmin/public_html/drupal/sites/all/modules/bbcode/bbcode-filter.inc on line 164

Generally it reports the same information but sometimes it will be another include file or even the node.module.

It is possible to rebuild the permissions with the Content Access module installed, but I have to uninstall all but the bare minimum of modules.

I have the max execution time in php.ini set to 90 seconds and the memory is at 128M.

The install and permissions rebuild were attempted in offline mode with no logged in users.

The site has 82 users, 30,000 comments, 4200 nodes, and 2200 forum posts.

Content cache was cleared prior to rebuild attempt.

Comments

jlmeredith’s picture

Title:Unable to rebuild permissions or uninstall module» Title correction

Unable to rebuild permissions or install/uninstall module

jlmeredith’s picture

Title:Title correction» Unable to rebuild permissions or install/uninstall module
fago’s picture

Category:bug» support
Status:Active» Fixed

hm, yeah that's bad.
You can try to
* increase your maximum available memory. Adjust it yourself, or if not possible ask your provider to do so.
* disable all other modules as far as possible and try again, then reactivate the others.

jlmeredith’s picture

Do you think this is a module related issue? I have tried to understand exactly what happens when permissions are rebuilt but have not found any information in the API, forums or elsewhere. How much does enabling and disabling modules affect if the permissions are rebuilt properly? i.e. if the blog module is disabled to rebuild permissions, does this result in the blog posts not being updated in the node grants or access tables?

jlmeredith’s picture

I am reporting some findings that I hope will help others who decide to try this module or any access control module currently available to 5.1 or earlier.

There is currently an issue in the 5.1 build of Drupal which will cause a site with high numbers of nodes (4000/128M Memory in my case) to error out when rebuilding node access permissions or when enabling / disabling a node access control module. This error is due to node_access_rebuild() calling node_load() and loading every node into cache thus causing an out of memory error. This occurs not only when using the rebuild permissions function in Content Management -> Post Settings but also anytime the node_access_rebuild() function is called such as when enabling or disabling access control modules.

The patch for this issue can be found here: http://drupal.org/node/108752 , or users can update to the current HEAD version of 5.x for the fix. There are plans to further address the issue in 6.x via a batching process.

It would be nice if module developers would include some information in the module documentation specifically about this issue. I believe after reading many different memory error issues throughout DO, that this is a big contributor to many mystery error issues.

Thanks

fago’s picture

yeah, thanks. I'll add a note to the README.

Anonymous’s picture

Status:Fixed» Closed (fixed)