Sylius: Fatal error, memory exhausted

Created on 24 Dec 2016  ·  7Comments  ·  Source: Sylius/Sylius

Hi,
I am trying to install Sylius on my Mac box, but the installer throw the following error, even though i've increased the memory limit to 1024M, and disablex XDEBUG.

`Success! Your system can run Sylius properly.
Step 2 of 4. Setting up the database.
Creating Sylius database for environment dev.
It appears that your database already exists. Would you like to reset it? (y/N) y
5/5 [||||||||||||||||||||||||||||] 100%
Warning! This will erase your database. Your current environment is dev.
Load sample data? (y/N) y
Loading sample data...
0/1 [| ] 0%
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /Users/smahi/Sites/PHP_Projects/Sylius_Projects/acme/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php on line 166

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /Users/smahi/Sites/PHP_Projects/Sylius_Projects/acme/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/OutOfMemoryException.php on line 1`

By the way i am using MAMP (php v7, mysql 5.x)
for the server i am using the built-in one.

Potential Bug

Most helpful comment

@smahi Are you sure you applied it correctly? Try installing with:

$ php -d memory_limit=-1 app/console sylius:install

Are you working on a 64-bit OS? Running 32-bit could also give some issues when a process needs lots of memory allocations. Also how much free memory do you have at your disposal?

All 7 comments

@smahi try memory_limit=-1

@rcsofttech85 unfortunately it did not work. the installer throw the same error

@smahi Are you sure you applied it correctly? Try installing with:

$ php -d memory_limit=-1 app/console sylius:install

Are you working on a 64-bit OS? Running 32-bit could also give some issues when a process needs lots of memory allocations. Also how much free memory do you have at your disposal?

@steffenbrem it works.
The first time i have set memory_limit in php.ini file to -1 but did not work. why that ?
by the way am using macOS Sierra

@smahi You can have different .ini files for both the PHP CLI and for example the Apache module (which is what you are probably using). To find out how your cli is configured, you can run $ php -i | grep ini and see which ini files are loaded 👍

@smahi If this solves your issue, please close it afterwards 😄.

@steffenbrem thank you very much.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

javiereguiluz picture javiereguiluz  ·  3Comments

igormukhingmailcom picture igormukhingmailcom  ·  3Comments

eb22fbb4 picture eb22fbb4  ·  3Comments

inssein picture inssein  ·  3Comments

inssein picture inssein  ·  3Comments