drush/drush.php cache clear
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 7458477 bytes) in /includes/database.mysql.inc on line 30
I have a HUGE amount of memory allocated.
I am running eAccelerator.
C
drush/drush.php cache clear
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 7458477 bytes) in /includes/database.mysql.inc on line 30
I have a HUGE amount of memory allocated.
I am running eAccelerator.
C
Comments
Comment #1
moshe weitzman commentedthis can't be drush because we just do what core does.
Comment #2
socialnicheguru commentedhmmm. how would i trouble shoot?
I goto the command line and type drush.php cache clear and I get the error above
when I goto performance and click clear cache it clears the cache. I checked phpadmin to make sure.
Would this signal a module that is doing something strange? Any thoughts on the best way to troubleshoot?
A
Comment #3
boazr commentedIt seems to me that it might be the different configurations of the php apache module and the CLI module (which I presume is what running drush).
I have a similar problem, but with a different error outputted, guess I'll take my own advice and dig into the cli php.ini:
Comment #4
grantkrugerRemember that the command line and the web page do not use the same php.ini file on all servers. If you type "locate php.ini" from the command line you may see a cli version as well.
In my case, on my Ubuntu Linux server, I see these:
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini
The first one is the php.ini file for my website (served from apache), which has the memory allocated to the site. The second one has the php.ini file for cli (Command Line Interface) memory. So you have to update memory_limit on your cli version if you want to give Drush more memory.
For anyone coming here who does not know how to change their memory limit, this may help (if you have command line access):
To find the php.ini files, from the command line you can type: locate php.ini - this will show you all php.ini files on your server.
Edit the file and search for memory_limit and increase it. In my case that line looks like:
memory_limit = 512M ; Maximum amount of memory a script may consume (32MB)
We have a monster server, so you may want to set your number lower than ours.
After editing your cli php.ini file you are good to go, but after editing the website php.ini you will have to restart your server for the change to take effect (in my case we use apache on a Linux server and the command is sudo /etc/init.d/apache2 restart ).
P.S. If you are not used to editing from the command line, use sudo pico filename . In my case that could be sudo pico /etc/php5/cli/php.ini . If pico does not work, try nano (they are the same). The command sudo will require that you put in your server user password and you need this level of access to change system files. Once in the editor you can search by pressing control-w. Make your change then control-x will exit and upon exit it will ask you if you want to save. Press y and then enter when it prompts you for the file name.