Sever memory exhausted while run content deploy command and sever memory can't be increase then how to run content deploy command?
4 Answers
Before posting a question on Stack Exchange, please have a little look around first, you'll often find the question has already been asked/answered. Maybe just asked in a slightly different way.
See the answer from this post: Fatal error "Allowed memory size" while run setup:static-content:deploy
For clarity, i think what you're looking for is (taken from post mentioned above) you can set the memory limit inline whilst running the static content deploy command:
php -dmemory_limit=6G bin/magento setup:static-content:deploy
Hope this helps.
-
Thanks for the feedback! Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score. By this reason i can't do upvote.– KrishnamCommented Feb 5, 2018 at 7:21
Please try below command
php bin/magento c:c
php bin/magento setup:upgrade
php -d memory_limit=5G bin/magento setup:static-content:deploy
php -d memory_limit=5G bin/magento setup:di:compile
Hope it works!
Use below command to set server limit just add below code in any of the command if you have any server memory limit error.
-dmemory_limit=6g
like below command check.
php -dmemory_limit=10g bin/magento setup:static-content:deploy
Deploy only themes you need, example:
php bin/magento setup:static-content:deploy --theme Magento/blank --theme Magento/luma