Drupal crashes when adding module in Modules admin screen

Drupal is a popular CMS that enables 3rd party development of extensions such as themes and modules. In order to get a good value site out of Drupal you need to install several modules and theme that provides functionality such as cool look and feel, SEO improvements, support for content types such as images and a lot more.

The problem:

When adding several modules to Drupal you try to enter the “modules” page in the administer menu and Drupal crashes with this error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1476899 bytes) in . . .

This usually happens after installing a new module – At first it seems like the last module I have just installed caused the problem (and it might be the cause for you, but not in this case) but after investigating the problem and trying multiple combinations of module it was clear – there isn’t any “one evil module” that caused the problem. I found is that if you install enough modules your Modules admin screen will require more and more memory resulting in your Modules admin screen crashing eventually.

The solution:

The solution is quite simple – Temporarily add more memory to your PHP process.
There is no other way, other than hacking into the Drupal code to solve this problem. After you have finished with the administration of the site you can return the memory setting to the default state.

Share the love...Tweet about this on TwitterShare on LinkedInShare on Google+Share on Facebook

Amir Shevat

Amir Shevat is the global Startup Outreach lead in Google Developer Relations (g.co/launch). Previously, Amir Led Google Campus Tel Aviv and was the co founder of several startups.

You may also like...

1 Response

  1. Gary Adam says:

    Nice post. I think this is exactly whats happening with mine. You would’ny happen to know the name of the file in Drupal 7 That conatins this info. I wouold like to up the memory of my Drupal installation

Leave a Reply

Your email address will not be published. Required fields are marked *