1

when i run php bin/magento deploy:mode:set production or

php -d memory_limit=768M bin/magento deploy:mode:set production 

I received the following error, how can i fix it?

Config "dev/debug/debug_logging = 0" has been saved. Starting compilation Something went wrong while compiling generated code. See the error log for detai ls. Disabling maintenance mode Command returned non-zero exit code: `/opt/cpanel/ea-php71/root/usr/bin/php -f /home/xxxxxx/public_html/bin/mage nto setup:di:compile` [2019-05-18 06:02:04] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"}} [] [2019-05-18 06:02:09] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"}} [] [2019-05-18 06:02:19] main.ERROR: /opt/cpanel/ea-php71/root/usr/bin/php -f /home/myusername/public_html/bin/magento setup:di:compile 2>&1 Compilation was started. %message% 0/7 [>---------------------------] 0% < 1 sec 62.0 MiB%message% 0/7 [>---------------------------] 0% < 1 sec 62.0 MiBProxies code generation... 0/7 [>---------------------------] 0% < 1 sec 62.0 MiB Proxies code generation... 1/7 [====>-----------------------] 14% < 1 sec 64.0 MiB Repositories code generation... 1/7 [====>-----------------------] 14% < 1 sec 64.0 MiB [] [] 
9
  • Can you please provide us the exception.log file? So that it can help us to fix the issue quickly. Thanks Commented May 18, 2019 at 5:44
  • hi, there seems to be no new content generated in exception.log. permission issue ? Commented May 18, 2019 at 5:57
  • Can you please run first php bin/magento setup:di:compile and post what you are getting the error? Commented May 18, 2019 at 7:17
  • no error when i ran "php bin/magento setup:di:compile". Commented May 18, 2019 at 7:40
  • So you are getting the error when you run this command php -d memory_limit=768M bin/magento deploy:mode:set production ? Another question currently are you on developer mode or production mode? Commented May 18, 2019 at 7:42

1 Answer 1

1

Here is one alternative you can skip compilation while changing mode

php bin/magento deploy:mode:set production -s

-s stands for --skip-compilation, it will skip compilation.

2
  • hi, skip compilation works, but i want to fix the issue eventually. Commented May 18, 2019 at 6:24
  • Facing same issue after magento 2.3.3 to 2.3.5 EE upgrade. Commented Sep 21, 2020 at 15:38

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.