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
    – Shankar
    May 18, 2019 at 5:44
  • hi, there seems to be no new content generated in exception.log. permission issue ? 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?
    – Shankar
    May 18, 2019 at 7:17
  • no error when i ran "php bin/magento setup:di:compile". 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?
    – Shankar
    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. May 18, 2019 at 6:24
  • Facing same issue after magento 2.3.3 to 2.3.5 EE upgrade. Sep 21, 2020 at 15:38

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.