data-migration-tool icon indicating copy to clipboard operation
data-migration-tool copied to clipboard

curious why composer needs >1,6GB of memory to install 1MB source code

Open f1-outsourcing opened this issue 4 years ago • 2 comments

I am not really familiar with composer and using it. I wanted to give it a try, migrating some data from magento 1.9 to 2.3.

Added the repo with this php -d allow_url_fopen=1 ../composer-1.phar config repositories.data-migration-tool git https://github.com/magento/data-migration-tool --no-plugins

executed this:

export COMPOSER_MEMORY_LIMIT=-1
php -d allow_url_fopen=1 -d disable_functions=none ../composer-1.phar require magento/data-migration-tool:2.4.1 

Getting this error:

[ErrorException]
  proc_open(): fork failed - Cannot allocate memory

Looking at top during this I see it grabbing 1.6GB RES memory. Why would installing a 1MB package require this????

f1-outsourcing avatar Jan 05 '21 16:01 f1-outsourcing

Hi @f1-outsourcing. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Jan 05 '21 16:01 m2-assistant[bot]

@f1-outsourcing Composer does require quite a bit of memory to come to the right conclusion of what packages to install (it reads all possible packages into memory for this). 1.6GB would not be unusual. (composer 2.1 might bring some major improvements). You can run the composer command with the --profile flag to see where memory usage happens.

fooman avatar Jan 15 '21 08:01 fooman