Search code examples
php.htaccessdrupal-6flot

Allowed memory size of X bytes exhausted (tried to allocate X bytes)


I saw this question, but the answer did not help me to solve the problem. So I'm sending a new question.

It drupal 6 site, that in this part it use the flot javascript to open files. It's work when I open few files but when I increase it, I get a blank page and in the error_log I get:

PHP Fatal error:  Allowed memory size of 524288000 bytes exhausted (tried to allocate 107678417 bytes) in /path/to/site/includes/common.inc on line 167, referer: http://server/spectra/list

I tried to increase the size of memory_limit in php.ini & .htaccess, I saw that the size changed with phpinfo() but when I load the page I get exactly the same error with the same number. I increase the size from 128M to 1024M and it still give the same error with the same number 524288000. Where this number is set? Thanks.


Solution

  • I cannot tell you directly where to find the setting but I can tell you how.

    If you're using a *nix system, do

    grep -r memory_limit /path/to/drupal/installation 
    

    If you're on Windows, use a(n advanced) text editor to search in the path.

    I suspect you'll find the setting in either index.php or settings.php.