-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command fails: bin/magento deploy:mode:set production #2561
Comments
@mc388 when you ran |
I installed it with require-dev but now it is working. I had the |
We have the same problem after calling composer install with the --no-dev flag. Is this a known issue that will be fixed? We are using Jenkins to build our sites and we don't want to include development requirements in the artifacts that we deploy to production. Workaround: |
@moleman: this is a good argument |
Yes, would be nice if this got fixed, we also run into this problem. |
@mc388 rhank you for reporting this issue. Internal ticket MAGETWO-47919 was created |
Faced with same issue. |
We got in the same issue after running Curiously, if we run |
Same issue here. Tried to go from default to production. Same error. Then I set it to developer. But now I can't go back to default or production. I'm stuck. I run it with PHP 7.0.4. |
I'm having the same issue |
same here. Running
Seems to be a problem with the smartwave porto theme. |
I'm also having this issue #3850 |
can you post the output of |
Thank you for your reply. I get the following error:
|
+1 @mazhalai and @mc388 for the tips when firing we also run but when trying
in stackoverflow someone also suggested to set memory_limit to 512M but we've already set it to 768M. issue still persist. NOTE: we've been working with Nexcess hosting provider, so based on past experience we're quite sure the issue isn't related to server misconfiguration and/or poor service |
Please try my workarround #3850 to check if it is something with your extensions. php -f bin/magento setup:di:compile-multi-tenant |
Bump, this still isn't fixed in Magento 2.0.5 @ Magento guys, I find it hard to believe that 6 months after the "stable" release, you still cannot setup a production-like environment for Magento 2 if you use This is the output we get:
(please ignore the comments above for people with their 3rd party modules, they should resolve this with their 3rd party) |
For me the problem suddenly appeared on April 29th or April 30th. We've had --no-dev in out build process since the beginning and this suddenly started happening. Due to the way out build process works we cannot use the composer.lock file. I'm guessing something changed in one of the million magento packages that broke something. Using Magento 2.0.4 |
One thing that resolve the issue for me was 'rm -rf /dev/' since this is a prod package I have no need of the dev subdirectory anyway. @alankent Why is /dev part of the base package and no a require-dev include? |
The best solution we've come up with to allow us to get round the PhpCsFixerReview.php error is to add the expected library from require-dev to require, giving a require setting like this:
While we wait for Magento to sort out this pretty fundamental issue, this should at least let us compile for production. |
In a very very quick test using Magento 2.1.0-rc1, it looks like this got fixed. |
This issue can be closed. Is fixed in Magento 2.1.0. |
Closed |
@romeof1980 Yes. |
Could you please post the error log too? ---- On Wed, 10 Aug 2016 10:12:29 +0200 notifications@github.com wrote ---- @romeof1980 Yes. — |
[2016-08-06 22:24:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_47c323d9e7fcb3063099dfdf783059118 and handles default, cms_index_index, cms_page_view, cms_index_index_id_everything-home: Veuillez corriger les données XML et essayer à nouveau. [] [] Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors. [] [] |
Hi there, quite sure it's a memory limit error. Follow the link to composer page in the log you just sent. You need to contact your host and ask them to increase the memory limit. Make a note to them, as you see in the composer suggestion, to verify that xdebug were not loaded. ---- On Wed, 10 Aug 2016 10:23:56 +0200 notifications@github.com wrote ---- [2016-08-06 22:24:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_47c323d9e7fcb3063099dfdf783059118 and handles default, cms_index_index, cms_page_view, cms_index_index_id_everything-home: Veuillez corriger les données XML et essayer à nouveau. [] [] Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors. [] [] — |
@romeof1980 Thanks but my memory limit is 2048MB. |
hi @nmallepally , |
hi @nmallepally , and here: you should increase allocated memory limit for PHP. please ask your host to read this message and give us a feedback hope that could help romeo |
@romeof1980 there is no xdebug extension on my php.ini, i did not request as it affects production perfomance. But when test the memory it shows limit value as 2G. what can i do? they say the website is taking 2048MB. Do you want me to run as -d memory=-1; ? |
hi @nmallepally , php -r "echo ini_get('memory_limit').PHP_EOL;" if the memory limit is confirmed to be correct as shown in phpinfo() referring to the following thread could help: in one of my website where I had a similar issue I was able to detect the problem was related to the theme installed |
@romeof1980 it shows 128mb. but on my phpinfo.php , it shows 2048mb. |
Hi guy! ---- On Wed, 10 Aug 2016 12:20:18 +0200 notifications@github.com wrote ---- @romeof1980 it shows 128mb. but on my phpinfo.php , it shows 2048mb. — |
@romeof1980 on my .htaccess the php value memory_limit is 2048mb, the last time they said i need to give a specific memory to run the script , which i did but it does not over ride i suppose. like -d memory=6G or -1. Do i need to create another copy of php.ini on my website and change the value. |
Tell me if I understood correctly: If yes try to contact your host again and ask what they think of it: is that for them the default behaviour? ---- On Wed, 10 Aug 2016 12:38:24 +0200 notifications@github.com wrote ---- @romeof1980 on my .htaccess the php value memory_limit is 2048mb — |
@romeof1980 this is what they replied, /opt/plesk/php/7.0/bin/php -C path/to/your/php.ini your_script.php But to make it simple, I've updated the global php.ini for the cli, it's now at 1G : ~$ /opt/plesk/php/7.0/bin/php -i | grep memory_limit And by the way, setting the limit using the "-d memory_limit=2048M" directive is working as well : ~$ /opt/plesk/php/7.0/bin/php -d memory_limit=2048M -i | grep memory_limit |
So? Did you try to deploy it to production with these setting in place? ---- On Wed, 10 Aug 2016 13:24:34 +0200 notifications@github.com wrote ---- @romeof1980 this is what they replied, /opt/plesk/php/7.0/bin/php -C path/to/your/php.ini your_script.php But to make it simple, I've updated the global php.ini for the cli, it's now at 1G : ~$ /opt/plesk/php/7.0/bin/php -i | grep memory_limit And by the way, setting the limit using the "-d memory_limit=2048M" directive is working as well : ~$ /opt/plesk/php/7.0/bin/php -d memory_limit=2048M -i | grep memory_limit — |
@romeof1980 I'm running the command now, Will paste the output here. |
Hi there, to be honest I haven't used windows anymore since I left the high school 15 years ago.. :) .. So about Putty I can't be of more help. And google around to check how to manage the timeout limit of that dreadful putty stuff.. ;) ---- On Wed, 10 Aug 2016 13:53:07 +0200 notifications@github.com wrote ---- @romeof1980 I'm running the command now, Will paste the output here. — |
@romeof1980 Hey thanks it worked and is in production mode. |
@nmallepally & @romeof1980: can you please continue this discussion some place else? This has nothing to do anymore with the original reported issue. You are currently spamming at least 16 people's mailboxes with all your messages. Thank you! :) |
Hi there.. This is now off-topic.. Anyway is related to permission in Magento 2. Try to check it with Firebug console and you'll probably find errors 404 related to static files (js, css). But please this need to be discussed in one of the thread in GitHub where "permission issue in Magento 2" is addressed. I'll send you a link asap ---- On Wed, 10 Aug 2016 15:12:35 +0200 notifications@github.com wrote ---- @romeof1980 Hey thanks it worked and is in production mode. — |
@hostep Apologies for that, we would discuss else where. |
hi @nmallepally , seeing that if you can set memory_limit to 2048M you're probably on a dedicated server: when setting permission or when troubleshooting them remember to check the right documentation either for dedicated or shared server. With dedicated server is going to be easier (just based on my own experience). TROUBLESHOOTING: just google around for "issue with static file in magento 2" you'll find many thread, among them: important: see what your firebug console (or similar) gives you as 404 error in order to confirm and further work on the issue if you need more help please write a question here: have a great day, |
@romeof1980 @hostep Regarding Production mode error, To Reproduce |
I have fixed this issue by updating composer. |
OMG :) 7cf6450 is obviously not a proper solution as
we don't need this file in non-dev environment. As a result of such incorrect change people are now having troubles with outdated dependencies in PROD: #8070 (comment) |
I have issue when switching from default mode to Production. Interception cache generation... 7/7 [============================] 100% 3 mins 306.0 MiB
\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object Interception cache generation... 7/7 [============================] 100% 3 mins 306.0 MiB PHP Fatal error: Uncaught Error: Class 'Magento\Indexer\Model\Config\Reader' not found in /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93 PHP version is 7.0.6 |
I was getting also errors trying to set mode on my local mamp setup and it proved to be memory_limit. So for everyone that uses MAMP and faces the same, note that when running from cli, it won't use the customised So just adjust the memory_limit there and |
Hi,
when I try to run
bin/magento deploy:mode:set production
it fails while executingphp -f /var/www/html/bin/magento setup:di:compile-multi-tenant 2>&1
I'm working on a clean Magento 2 EE instance.
Running
bin/magento setup:di:compile-multi-tenant
throws this error:The class
StaticReview\Review\AbstractReview
not exists in any directory.The text was updated successfully, but these errors were encountered: