Results 1 to 6 of 6

Thread: Running our of memory for drush.php commands

  1. #1

    Default Running our of memory for drush.php commands

    In Leap 15.1, php is not reading the memory limit (4000M) I have set in /etc/php7/apache2/php.ini and also in /srv/www/htdocs/php.ini.
    info.php displays memory_limit as 4000M
    But
    Code:
    # php -r 'print ini_get("memory_limit") . "\n";'
    128M
    When I try to run drush in a script, I get
    Code:
    PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /srv/www/htdocs/public_html/vendor/bin/drush.php on line 5
    My computer has lots of memory.
    How do I change the php memory limit globally? I copied php.ini into /root/.drush but that did not help.
    I also have trouble running composer, having to prefix the command with
    Code:
    COMPOSER_MEMORY_LIMIT=-1 composer

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,308
    Blog Entries
    14

    Default Re: Running our of memory for drush.php commands

    To check from a prompt you also have to set it in the cli/php.ini
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3

    Default Re: Running our of memory for drush.php commands

    Quote Originally Posted by Knurpht View Post
    To check from a prompt you also have to set it in the cli/php.ini
    where is cli/php.ini?
    Thanks,
    Jim

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,759

    Default Re: Running our of memory for drush.php commands

    Just seeing this, having no idea what thethread is about, but:
    Code:
    boven:~ # find / -name 'php.ini'
    /etc/php7/apache2/php.ini
    /etc/php7/cli/php.ini
    boven:~ #
    Henk van Velden

  5. #5

    Default Re: Running our of memory for drush.php commands

    Thank you. So easy to do.

  6. #6

    Default Re: Running our of memory for drush.php commands

    I changed the memory in all three places to 4000M
    Code:
    find / -name 'php.ini'
    /etc/php7/cli/php.ini
    /etc/php7/apache2/php.ini
    /etc/php7/fastcgi/php.ini
    memory_limit = 4000M
    but still get 128M.
    # php -r 'print ini_get("memory_limit") . "\n";'
    128M

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •