I'm getting out of memory errors such as:
Fatal error: Out of memory (allocated 7864320) (tried to allocate 7680 bytes) in /home/<myaccount>/public_html/development/avenue/includes/database/database.inc on line 2487
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Out of memory (allocated 7864320) (tried to allocate 7680
bytes) in
/home/<myaccount>/public_html/development/avenue/includes/database/database.inc,
line 2487when I try to run the command (in Terminal on Mac OS X 10.7.4, with Drush 5.4 and MAMP 2.0.5)
drush @avenue-dev status
@avenue-dev is defined in my aliases file:
$aliases['avenue-dev'] = array(
'uri' => 'default',
'root' => '/home/<myaccount>/public_html/development/avenue', //Path to website root on your production server
'remote-host' => 'development.<myaccount>.co.uk', // url to your production web server accessible via ssh
'remote-user' => '<myusername>', // your username on that server. Remember that you should have ssh keys for logging in
'ssh-options' => '-p 8899',
'path-aliases' => array(
'%dump' => '/home/<myaccount>/SQL/avenue-dev-dump.sql', //this keeps you from having to specify dump files
'%drush' => '/home/<myaccount>/drush',
'%drush-script' => '/home/<myaccount>/drush/drush',
),
);
It would seem that drush is being limited to 8MB, but the fact I can't even run drush status is making it very difficult to debug, as I can't determine which php.ini file it's using. I've worked with my hosting provider (we have a vserver account with them), and they can run the command directly on the server, and have changed all the php.ini files we can think of to 256MB.
I still have my old laptop, and can run the exact same command fine from there (Drush 5.4, Mac OS X 10.6 and MAMP 1.8.4), which again makes me think this is not a problem with the web hosting server, but something local to my new Mac laptop.
I can also run drush fine locally on the new laptop, to all my localhost sites - these memory errors are only occurring when I use site aliases that link to the development and production sites hosted on my vserver.
Any suggestions as to what I might try next to fix this? I'm totally totally lost without drush!!
Comments
Comment #1
moshe weitzman commentedphp --inishows you the ini files that are in effect for a CLI requestComment #2
rachelf commentedThanks - I've run that and initially it said
So I copied the file php.ini.default usr/etc and edited it so that I've got
memory_limit = 256MNow I run php --ini and it says
but I am still getting the same error message for memory?
Comment #3
moshe weitzman commentedphp -iwill show you the .ini values in effect for CLI request.Comment #4
rachelf commentedI'm afraid I'm still not getting anywhere.
php -i shows
and further down I can see
memory_limit => 256M => 256Mbut I still get the error message.
Comment #6
rachelf commentedThis turned out to be an SSH problem relating to Mac OS X 7 Lion.
The SSH client shipped with Lion seems to be sending incorrect values to the server. The fix is to tell the SSH client not to send any LC_* variable:
You should end up with the following fragment:
Many thanks to ded for helping me out on this. Here's the link to the original post that helped him solve this: http://thegreyblog.blogspot.co.uk/2012/02/fixing-mac-os-x-lions-ssh-utf-...
Comment #6.0
rachelf commentedReplaced my server details with and