Thanks for this module/script! It removed some stale file references that were resulting in clogging up my log file.
However the script did not ran to completion due to an out of memory error, copied below.
Increasing the PHP memory_limit in php.ini to 256M, 512M, then 1024M still produced the same error, except that the quoted .inc file and line number changed (the allowed memory size figure remains the same).
The site in question is on a shared host, so the script was run from the browser, if that has any relevance...
Drupal v7.8
DRUPAL_ROOT is /home/mysite/public_html.
Bootstrapping to DRUPAL_BOOTSTRAP_SESSION
Doing registry_rebuild() in DRUPAL_BOOTSTRAP_SESSION
Bootstrapping to DRUPAL_BOOTSTRAP_FULL
Doing registry_rebuild() in DRUPAL_BOOTSTRAP_FULL
Deleted 3 stale files from registry manually.Flushing all caches
Fatal error: Allowed memory size of 41,943,040 bytes exhausted (tried to allocate 1024 bytes) in /home/mysite/public_html/includes/menu.inc on line 2626
Comments
Comment #1
rfayHmm... If this is an error that you received *after* trying to raise the memory limit, you probably didn't succeed. This shows a limit of 41,943,040 bytes, about 40M. Note that on many distributions (like debian/ubuntu) the memory limit is configured in a separate php.ini for cli processes. (/etc/php5/cli/php.ini)
Comment #2
rfayThis was a result of not having php's memory limit high enough
Comment #3
rdeboerI feel this issue was closed somewhat prematurely. As described at the top, symptoms are such that it seems no matter how high you set the memory limit and re-run the script, the execution spirals out of control and will eventually hit whatever limit is set.
Comment #4
rfayUmm.. Waited for a month and got no response?
Your error message clearly states that you have *not* successfully raised your memory_limit. Since there are many ways to do this, you probably just haven't succeeded in getting it to work.
You can hack registry_rebuild and add a
into it and see exactly what the memory_limit is set to and what php.ini is being used to find that out. And if you can recreate this and want help with it catch me in IRC and I'll try to help you.
Comment #5
rdeboerHi Randy,
Inserting phpinfo() was a good idea. And indeed the memory limit had not gone up, because I used a php.ini in the Drupal root, which does not get read when using the registry_rebuild script.
Because this is a case of shared hosting and I don't have access to the configuration file mentioned in the phpinfo() output, I raised the memory limit by placing in directory .../sites/all/modules/registry_rebuild a php.ini file with the following content:
Then pointed browser to http://mysite.com/sites/all/modules/registry_rebuild/registry_rebuild.php
All ok!
Maybe something you could mention on the project page?
Best,
Rik
Comment #6
rfayI don't see any reason we shouldn't just add an
in both files.
There are so very many ways to set the memory_limit, but in this case, why not just use the one at hand?
BTW, if you can do the memory_limit change the way you did, then your host does in fact provide some way for you to up it. http://drupal.org/node/207036 gives a catalog of some of the ways.
Comment #7
rfayComment #8
rfayCommitted in http://drupalcode.org/project/registry_rebuild.git/commitdiff/a5d720c
Comment #9
rdeboerLovely!