Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

This happened when I restarted Apache because my site was down. Normally restarting Apache or other service doesn't break Drush, but today it happened.

I'm sure on my server my php.ini has memory limit set to 1024M, this is my own dedicate server, and the Drupal installation runs well, I check the status report on Drupal (admin/reports/status), the PHP memory limit is set to 1024M.

This happened on my Drupal sites on my server.

When I...

[root: sites]# drush st

I got

Drush command terminated abnormally due to an unrecoverable error.       [error]
Error: Out of memory (allocated 10485760) (tried to allocate 122880
bytes) in /home/mywebsite/public_html/modules/system/system.module, line 1336

I also tried...

[root: sites]#  php -i | grep memory_limit

And I got

memory_limit 1024M

Is there anyone has some ideas?

My Server:

  • CENTOS 5.9 x86_64
  • WHM 11.36.0 (build 14)
  • PHP 5.2.17
  • Drush 5.8

I've tried drush status --debug and it gave me :

Bootstrap to phase 0. [0 sec, 3.02 MB]
[bootstrap] Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 3.23 MB] [bootstrap] Cache HIT cid: 5.8-commandfiles-0-15880291c3f5c759ee66bf106fd77cbd [0.01 sec, 3.24 MB] [debug] Bootstrap to phase 0. [0.04 sec, 7.43 MB]
[bootstrap] Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.05 sec, 7.49 MB] [bootstrap] Drush command terminated abnormally due to an unrecoverable error.
[error] Error: Out of memory (allocated 10485760) (tried to allocate 122880 bytes) in /home/mywebsite/public_html/modules/system/system.module, line 1336 [0.06 sec, 9.28 MB]

share|improve this question
    
how many modules do you have installed on the site? have you tried drush status --debug to get a more useful trace of whats going on ... –  tenken Mar 20 '13 at 14:50
1  
The memory error is strange because the message says allocated 10485760 which is only 10M. –  tostinni Mar 20 '13 at 16:58
    
@tenken Thanks I've tried and pasted the result in my question. –  Hana J. Chang Mar 21 '13 at 5:17
add comment

1 Answer 1

Your particular setup might be one that (deliberately) has 2 php.ini files:

  1. for Apache, e.g. on your server at: /etc/php5/apache2/php.ini (or similar path depending on your distro)
  2. for command line (i.e. for drush) e.g. on your server at: /etc/php5/cli/php.ini (or similar path depending on your distro)

(I believe that this is perfectly normal kind of setup to have 2 files, I have this myself.)

You need to ensure that memory_limit is 1024M is set for /etc/php5/cli/php.ini(or similar path depending on your distro) php executed in the command line/terminal/console i.e. drush. You could also try memory_limit is -1 which allows the server to allocate as much memory as is available.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.