From 47156103a611954965f5858cfc84e4ee6b1ef6f4 Mon Sep 17 00:00:00 2001 From: Kirill chEbba Chebunin Date: Fri, 24 Aug 2012 13:53:02 +0400 Subject: [PATCH] Remove hard coded memory limit. Add troubleshooting doc --- bin/composer | 1 - doc/articles/troubleshooting.md | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 doc/articles/troubleshooting.md diff --git a/bin/composer b/bin/composer index 1ea4284e7..f65da48d8 100755 --- a/bin/composer +++ b/bin/composer @@ -7,7 +7,6 @@ use Composer\Console\Application; error_reporting(-1); @ini_set('display_errors', 1); -@ini_set('memory_limit', '512M'); // run the command application $application = new Application(); diff --git a/doc/articles/troubleshooting.md b/doc/articles/troubleshooting.md new file mode 100644 index 000000000..36cc54f14 --- /dev/null +++ b/doc/articles/troubleshooting.md @@ -0,0 +1,25 @@ + +# Memory limit errors + +If composer shows memory errors on some commands: + + PHP Fatal error: Allowed memory size of XXXXXX bytes exhausted <...> + +The `memory_limit` ini value should be increased. + +Get current value: + + php -r "echo ini_get('memory_limit').PHP_EOL;" + + +Increase limit with `php.ini` for a `CLI SAPI` (ex. `/etc/php5/cli/php.ini` for Debian-like systems): + + ; Use -1 for unlimited or define expicit value like 512M + memory_limit = -1 + +Or with comand line arguments: + + php -d memory_limit=-1 composer.phar <...> +