Hello,

the following blog post describes exactly a major problem in the drupal menu router. We found related bug reports but not really any issues that solved the described problem. We would like to point to this problem and hope that it could be resolved in a future drupal release.
http://www.drupalonwindows.com/en/blog/fixing-drupal-site-locks-during-m...

Our particular problem:
One of our large sites was broken, just when we updated a view. It seems the view triggered a menu_rebuild and with the next site calls, no more pages were served at it seems the page response was stuck in rebuilding the menu router. So the complete (non-cached) site was unusable. No end user process (via php-fpm) could end the menu_rebuilding in time and menu rebuilding via drush takes several hours for us.
With the patch, a cached menu is served until its rebuilt and the pages could still be served, not leading in a total crash of the whole site.

I submitted an exemplary patch that shows one solution without depending on a MSSQL infrastructure. I think one of the core developers could use this to write a proper patch for drupal.

In fact apart from this exemplary patch, we're going to solve this problem for us by forbidding to rebuild the menu_router via "normal" page calls but just by cronned drush executions. As we're using a lot of drush cron runs, I think the best solution is not to rebuild the menu_router via an end user page call via the web server but perhaps just via a drush command. At least some config for this would be nice.

Thanks in advance

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pBartels created an issue. See original summary.

ron_s’s picture

Version: 7.43 » 7.x-dev
Status: Active » Needs work

This is an interesting idea, although a lot more work would be necessary. We have run into similar problems with our site crashing due to a menu rebuild being run. In our situation, Redis had reached its maximum usage, so it cleared the menu as a way to free up space. The next rebuild caused the site to lock up.

The example on the Drupal on Windows site would require the addition of a completely different approach for performing a database transaction. I'm not sure that approach would be possible, but maybe there is something of value that could be built using the standard db_transaction function.