Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3669969 bytes) in ../public_html/includes/theme.inc on line 2019
on Pathouto Patterns ( Home » Administration » Configuration » Search and metadata » URL aliases )

Unable to access the pathout patterns.

Please help me to fix this issue.


dpacassi’s picture


I had the same problem on a site which uses quite a few content types.
Apparently there is a memory leak when creating the token help fields.

You have two possibilities:
- Your drupal instance is using a total memory of 128 mb. You can try to increase this value to a higher number. (For example writing "php_value memory_limit 1024M" in your .htaccess file will increase the used memory to 1024 mb)


- If you know how to use tokens, you simply can disable the token help for the pathauto patters admin page.
For this, open pathauto.admin.inc and go to line 76. Comment out the three lines where $form[$module]['token_help']['help'] is being set. That's all, now you can access the page without having to increase the used memory!
Remember that your comment would be removed when updating the module. So keep that in mind when updating the pathauto module.


thuzyanth’s picture

Hi David,
its really helpful
Thank you so much.


Pere Orga’s picture

Category: Support request » Bug report
Status: Active » Closed (duplicate)

I think this is token issue, and is already reported (here at least)

kejmil’s picture

Hey David! Thank you so much! My life has been saved :-D

ann b’s picture

Thank you David. Modifying the pathauto.admin.inc worked for me. Devel showed the PHP peak at over 500MB when rendering the patterns page without your change. After your change it went down to 36MB.

dicoreh’s picture

Where is the pathauto.inc file?

ann b’s picture

@dicoreh - the file is sites/all/modules/pathauto/pathauto.admin.inc

You can also try the Token Tweaks module. I decided to use the module as described here in production.

Sahil Gupta’s picture

You can use a module to control this memory limit as well. PHP Runtime Configurator module provides many options to configure without changing your php.ini file and restart Apache.
You can configure following parameters:

- File Upload Limit
- Memory Limit
- Maximum Execution Time Limit
- Maximum Input Variable Limit