8

I am trying to setup Magento 2.0 (community) in a WAMP server and I am getting the error below all the time while I run the command for deploy the assets static due to symlink issues at Windows environments:

php bin/magento setup:static-content:deploy

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 64 bytes) in C:\wamp\www\magento\vendor\oyejorge\less.php\lib\Less\Visitor\processExtends.php on line 445

I have setup memory_limit as -1 (no limit) but this takes no changes. I don't know what else to do in this case since the issue goes beyond my PHP knowledge and setting that value to no limit should do the job unless I need to install something else to get this working. Any advices? Any workaround?

52

quick solution add memory size in the command :

php -dmemory_limit=6G bin/magento setup:static-content:deploy

change 6G to what you want

  • 3
    FWIW, we recommend 768M for normal use and 2G for testing. Your mileage might vary... example – Steve Johnson Jan 18 '16 at 15:47
  • 1
    I have only a template installed and a single product, setting 2G still gets the memory error. Why is this damn thing so memory consuming? – Scott Nov 13 '17 at 19:31
1

In dev mode I managed to solve this issue by running the following command: rm -rf pub/static/* var/di var/generation var/cache var/page_cache

0

Increase the memory limit to update .php.ini file

If you have access to your php.ini file or can create one in the root, you can globally increase your allocated memory.

;adjust memory limit
memory_limit = 6G
max_execution_time = 36000
max_input_time = 36000

If you not want to update .php.ini file then use below command

php -dmemory_limit=6G bin/magento setup:static-content:deploy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.