magento / data-migration-tool

Magento Data Migration Tool
https://devdocs.magento.com/guides/v2.3/migration/bk-migration-guide.html
Open Software License 3.0
334 stars 200 forks source link

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

Open f1-outsourcing opened 3 years ago

f1-outsourcing commented 3 years ago

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????

m2-assistant[bot] commented 3 years ago

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


fooman commented 3 years ago

@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.