Hi,
I am running magento 2.2.2, it's been working fine, but recently I had a problem and switched magento to developer mode, which the problem was solved. but when I went to switch back to production mode, I am getting an error and the page is not loaded, just a blank page.
this is the log:
[2019-02-20 15:34:30] main.INFO: php.exe -f \bin\magento setup:di:compile 2>&1 Compilation was started. %message% 0/7 [>---------------------------] 0% < 1 sec 48.0 MiB%message% 0/7 [>---------------------------] 0% < 1 sec 48.0 MiBProxies code generation... 0/7 [>---------------------------] 0% < 1 sec 48.0 MiB Proxies code generation... 1/7 [====>-----------------------] 14% 1 sec 50.0 MiB Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 50.0 MiB Repositories code generation... 2/7 [========>-------------------] 28% 32 secs 174.0 MiB Service data attributes generation... 2/7 [========>-------------------] 28% 32 secs 174.0 MiB Service data attributes generation... 3/7 [============>---------------] 42% 32 secs 174.0 MiB Application code generator... 3/7 [============>---------------] 42% 32 secs 174.0 MiB Application code generator... 4/7 [================>-----------] 57% 1 min 194.0 MiB Interceptors generation... 4/7 [================>-----------] 57% 1 min 194.0 MiB Interceptors generation... 5/7 [====================>-------] 71% 1 min 214.0 MiB Area configuration aggregation... 5/7 [====================>-------] 71% 1 min 214.0 MiB Area configuration aggregation... 6/7 [========================>---] 85% 1 min 276.0 MiB Interception cache generation... 6/7 [========================>---] 85% 1 min 276.0 MiB Interception cache generation... 7/7 [============================] 100% 1 min 276.0 MiB Generated code and dependency injection configuration successfully. [] [] [2019-02-20 15:38:38] main.INFO: php.exe -f \bin\magento setup:static-content:deploy -f en_GB en_US 2>&1 Deploy using quick strategy frontend/Magento/blank/en_GB 0/2914 >--------------------------- 0% % < 1 sec [1A[2Kfrontend/Magento/blank/en_GB 5/2914 >--------------------------- 0% % 1 sec [1A[2Kfrontend/Magento/blank/en_GB 283/2914 ==>------------------------- 9% % 2 secs [1A[2Kfrontend/Magento/blank/en_GB 542/2914 =====>---------------------- 18% % 3 secs [1A[2Kfrontend/Magento/blank/en_GB 606/2914 =====>---------------------- 20% % 4 secs [1A[2Kfrontend/Magento/blank/en_GB 704/2914 ======>--------------------- 24% % 5 secs [1A[2Kfrontend/Magento/blank/en_GB 742/2914 =======>-------------------- 25% % 6 secs [1A[2Kfrontend/Magento/blank/en_GB 1025/2914 =========>------------------ 35% % 7 secs [1A[2Kfrontend/Magento/blank/en_GB 1268/2914 ============>--------------- 43% % 8 secs [1A[2Kfrontend/Magento/blank/en_GB 1471/2914 ==============>------------- 50% % 9 secs [1A[2Kfrontend/Magento/blank/en_GB 1601/2914 ===============>------------ 54% % 10 secs [1A[2Kfrontend/Magento/blank/en_GB 1779/2914 =================>---------- 61% % 11 secs [1A[2Kfrontend/Magento/blank/en_GB 1950/2914 ==================>--------- 66% % 12 secs [1A[2Kfrontend/Magento/blank/en_GB 1989/2914 ===================>-------- 68% % 13 secs [1A[2Kfrontend/Magento/blank/en_GB 2189/2914 =====================>------ 75% % 14 secs [1A[2Kfrontend/Magento/blank/en_GB 2266/2914 =====================>------ 77% % 15 secs [1A[2Kfrontend/Magento/blank/en_GB 2405/2914 =======================>---- 82% % 16 secs [1A[2Kfrontend/Magento/blank/en_GB 2551/2914 ========================>--- 87% % 17 secs [1A[2Kfrontend/Magento/blank/en_GB 2689/2914 =========================>-- 92% % 18 secs [1A[2Kfrontend/Magento/blank/en_GB 2815/2914 ===========================> 96% % 19 secs [1A[2Kfrontend/Magento/blank/en_GB 2818/2914 ===========================> 96% % 20 secs [1A[2Kfrontend/Magento/blank/en_GB 2819/2914 ===========================> 96% % 24 secs [1A[2Kfrontend/Magento/blank/en_GB 2914/2914 ============================ 100% % 24 secs [1A[2K[1A[2K[1A[2K[1A[2K[1A[2K[1A[2K[1A[2K[1A[2Kfrontend/Magento/blank/en_GB 2914/2914 ============================ 100% % 24 secs adminhtml/Magento/backend/en_GB 2360/2360 ============================ 100% % 19 secs frontend/Magento/blank/en_US 2914/2914 ============================ 100% % 29 secs frontend/Magento/luma/en_GB 2930/2930 ============================ 100% % 33 secs adminhtml/Magento/backend/en_US 2360/2360 ============================ 100% % 20 secs frontend/Magento/bitsbytes/en_GB 2935/2935 ============================ 100% % 26 secs frontend/Magento/luma/en_US 2930/2930 ============================ 100% % 26 secs frontend/Magento/bitsbytes/en_US 2935/2935 ============================ 100% % 30 secs Execution time: 241.11057186127 [] [] </pre>
Solved! Go to Solution.
I have found the solution. it was this:
1. Switch to production mode (php bin/magento deploy:mode:set production)
2. Clean and flush cache:
php bin/magento cache:clean
php bin/magento cache:flush
3. Run composer install, I know that it does not make sense, from magento root: composer install
4. It will report that there is nothing to install or update but now magically everything is working fine.
Hello @robertbits ,
I can't see any error in terminal text.
Please run below command to make production mode
php bin/magento deploy:mode:set production
--
If my answer is useful, please Accept as Solution & give Kudos
I was referring to this part:
[1A[2K[1A[2K[1A[2K[1A[2K[1A[2K[1A[2K[1A[2K[1A[2Kfrontend/Magento/blank/en_GB
I have run the command you told me, that command I use it to switch the mode. but when finishes the frontend is a blank screen and the backend gives me this error:
This page isn’t working 10.1.1.3 redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS
I have found the solution. it was this:
1. Switch to production mode (php bin/magento deploy:mode:set production)
2. Clean and flush cache:
php bin/magento cache:clean
php bin/magento cache:flush
3. Run composer install, I know that it does not make sense, from magento root: composer install
4. It will report that there is nothing to install or update but now magically everything is working fine.
I am having the same issue but, your "composer install" does not work and I need to know more. Where did you find your solution? What "composer install" command did you run?
Basically, what I did was this:
when I ran "composer install", I got a message that nothing was installed and updated, but when I checked the website it worked fine.
if you still don't work, check the \var\log\ to see if there is any indication what is happening.
If enabling production mode has broken all the shop pages. Run below commands in sequence.
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
Note: Here we are not compiling again. It is assumed that the compilation was successful while enabling the production mode.
It's not a solution. composer install creates .regenerate file in var directory. Next openning a page Magento will clear generated folder. That's why you can see a page.
Thank you soooooooo much it works, it tried many other solution but it didn't work your sloution was helpful
@robertbits wrote:I have found the solution. it was this:
1. Switch to production mode (php bin/magento deploy:mode:set production)
2. Clean and flush cache:
php bin/magento cache:clean
php bin/magento cache:flush
3. Run composer install, I know that it does not make sense, from magento root: composer install
4. It will report that there is nothing to install or update but now magically everything is working fine.