cancel
Showing results for 
Search instead for 
Did you mean: 

Installation process "Killed" due to memory allocation

SOLVED

Installation process "Killed" due to memory allocation

Hi ,

 

I am trying to install magento 2.4.0 on 

__| __|_ )
_| ( / Amazon Linux AMI
___|\___|___|

https://aws.amazon.com/amazon-linux-ami/2018.03

It has 1 GB RAM

 

Below are the commands used 

 

$ composer create-project --repository-url =https://repo.magento.com/ magento/project-community-edition .
Creating a "magento/project-community-edition" project at "./"
Installing magento/project-community-edition (2.4.0)
- Installing magento/project-community-edition (2.4.0): Downloading (100%) Created project in /var/www/html/magento240/.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Killed

 

I was parallelly checking in another SSH session. It is very obvious that I ran out of RAM below are the details. 

 

Is there any solution or workaround where I can install it with 1 GB ram?

 

$ free -m
total used free shared buffers cached
Mem: 985 921 63 0 0 5
-/+ buffers/cache: 915 70
Swap: 0 0 0


$ free -m
-bash: fork: Cannot allocate memory

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Installation process "Killed" due to memory allocation

hi @Nishu Jindal ,

 

I figured out , there is a space in the command between "url" and "=". rectified the same.

 

/usr/bin/php -d memory_limit=-1 /usr/local/bin/composer create-project --repository-url =https://repo.magento.com/ magento/project-community-edition .

View solution in original post

3 REPLIES 3

Re: Installation process "Killed" due to memory allocation

Hi @deepak_sharma28  ,

 

Try to run your command like below format

Check the path of php and composer

Using commands

Which composer 

Will return you /usr/bin/composer 

 

/usr/bin/php -dmemory_limit=-1 /usr/bin/composer create-project --repository-url =https://repo.magento.com/ magento/project-community-edition .

 

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

Re: Installation process "Killed" due to memory allocation

Hi @Nishu Jindal ,

 

Tried the mentioned, but its giving invalid argument error.

 

$ /usr/bin/php -d memory_limit=-1 /usr/local/bin/composer create-project --repository-url =https://repo.magento.com/ magento/project-community-edition .


[InvalidArgumentException]
Invalid repository url (=https://repo.magento.com/) given. Has to be a .jso
n file, an http url or a JSON object.


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

 

Also Tried with simple composer line but now its giving same error which was working earlier.

 

$ composer create-project --repository-url =https://repo.magento.com/ magento/project-community-edition .

[InvalidArgumentException]
Invalid repository url (=https://repo.magento.com/) given. Has to be a .jso
n file, an http url or a JSON object.


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

 

 

Re: Installation process "Killed" due to memory allocation

hi @Nishu Jindal ,

 

I figured out , there is a space in the command between "url" and "=". rectified the same.

 

/usr/bin/php -d memory_limit=-1 /usr/local/bin/composer create-project --repository-url =https://repo.magento.com/ magento/project-community-edition .