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

Cannot install tool using composer due to out-of-memory error, is there another install method? #850

Open apollolux opened 3 years ago

apollolux commented 3 years ago

Installing the data-migration-tool using composer fails due to composer reaching memory limits during the dependency resolution stage. Removing the memory limit using composer's documented troubleshooting methods doesn't solve the problem. Is there a non-composer method to installing this Magento data-migration-tool?

Preconditions

  1. Linux shared hosting with cPanel from GoDaddy, 2GB RAM, SSH shell enabled, swap exists (1GB size)
  2. PHP 7.3.17, server-wide memory limit 768M
  3. Magento 2.4.0 installed via cPanel Installatron, almost no configuration beyond that except for locale
  4. need to migrate from a Magento Open-Source 1.9.4.4 installation
  5. Composer 1.10.13

Steps to reproduce

  1. Log into shell, cd into magento site root
  2. repo.magento.com repository use is confirmed in composer.json
  3. Run composer require magento/data-migration-tool:2.4.0
  4. Alternatively, run php -d memory_limit=-1 /path/to/composer require magento/data-migration-tool:2.4.0

Expected result

  1. Composer should just barely finish

Actual result

  1. Composer errors out unable to allocate memory due to limit reached during the dependency resolution step

Additional notes

Composer's out-of-memory problems during dependency resolution are well known and documented and even as of the current stable 1.10.13 version still not yet resolved. It is not NPM and not ready for prime time. While many PHP projects in 2020, some of them major like Symfony, do offer Composer-based installation workflows and of course recommend that path for ease of dependency management, many of those projects still offer non-Composer based procedures as well. What should be a relatively simple data migration tool with few dependencies is completely unusable because it cannot be installed at all using the only documented installation method available, Composer.

Please provide an installation method, official or unofficial, that does not require a third-party tool like Composer to work. Even if it's an archive dump of literally all the files data-migration-tool needs in order to work that can just be uploaded into a given subfolder in the Magento files root, please offer an installation method that removes the unreliable middleman that is Composer.

m2-assistant[bot] commented 3 years ago

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


f1-outsourcing commented 3 years ago

I have the same, really ridiculous that 1,6GB of memory is still not enough to install this.

I have installed it like this

mkdir -p app/code/magento/data-migration-tool/
git clone --branch 2.3.5 https://github.com/magento/data-migration-tool.git app/code/magento/data-migration-tool/
php -d disable_functions=none bin/magento module:enable Magento_DataMigrationTool
php -d disable_functions=none -d memory_limit=1000M bin/magento setup:upgrade

And getting error on setup:di:compile

PHP Fatal error: Interface 'Migration\App\Step\StageInterface' not found in /home/ ... /app/code/magento/data-migration-tool/src/Migration/App/SetupDeltaLog.php on line 16

f1-outsourcing commented 3 years ago

Oh oh when I create this symlink things start to work with the compile

cd app/code

drwxr-s--- 3 6073 6073  28 Jan  5 13:04 AvS
drwxr-s--- 5 6073 6073 122 Jan  5 13:04 ..
drwxr-s--- 3 6073 6073  33 Jan  6 11:15 magento
lrwxrwxrwx 1 6073 6073  42 Jan  6 11:26 Migration -> magento/data-migration-tool/src/Migration/