I was getting :
warning Drush command terminated abnormally.
And after long hours, i realized that drush was crashing as a results of
Allowed memory size of 134217728 bytes exhausted (tried to allocate 40960 bytes)
Had to scroll up to pages and pages of debug info before i saw that.
If this is your problem, you can change the below value in php.ini to 512M and try the drush command again.
memory_limit = 128M
Instead of changing the value in /etc/php.ini, a better solution is to add drush.ini file with the value to your path (see below)
- create drush.ini in your path such as (/usr/local/bin/drush.ini) see its contents below. Change permissions so the user running drush can load the file.
- add this to your ~/.bashrc (export PHP_INI_SCAN_DIR=:/usr/local/bin) then
(source ~/.bashrc) to reload it
content of drush.ini can be
memory_limit = 512M
Note: drush.ini might be ignored even after setting as above so double check.
- See loaded config files :$ PHP_INI_SCAN_DIR=:/usr/local/bin/ php --ini
- See memory limit assigned to the script:$ drush php:eval "echo ini_get('memory_limit');"
How to have drush specific config values rather than changing php.ini