Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
Can anyone tell us what the impact is if we rebuild permissions for 10K nodes. I suppose we cannot do this on a live website, but better to put the website in maintenance.
Frederik
Comments
Comment #1
vlad.pavlovic CreditAttribution: vlad.pavlovic commentedYour big worry here would be a timeout. IIRC, node_access_rebuild has a manual timeout set of something like 2 minutes, so if it would take longer for your system to finish (likely) then you would run into problems.
What I would recommend is to definitely backup your database if you have the ability to do so, and I would probably use drush in order to execute the command (again if you have the ability to).
While there is no drush command that does this per se, but you could do something like:
drush php-eval 'node_access_rebuild();'
If you do not have drush access, your task is a bit riskier, but there are some good comments and even recommendations here: https://drupal.org/node/158043#comment-881058.
Hope that helps.
Comment #2
websmash CreditAttribution: websmash commentedThanks for feedback.
Is it an idea to do the run for only 1,5 minutes?
We have done the run already for 2 seconds and 80 nodes were changed.
Is this an idea? If succesfully, we can repeat until all nodes are rebuild in case of permissions.
Comment #3
vlad.pavlovic CreditAttribution: vlad.pavlovic commentedThat might work if your call is being made in batch mode. But I am really not 100% sure and I don't want you to mess up your site. I think that drush is the safest way of doing it.