cancel
Showing results for 
Search instead for 
Did you mean: 

Is it normal for Magento go offline/break every time you run the compile/deploy commands etc

Is it normal for Magento go offline/break every time you run the compile/deploy commands etc

I am very scared to work on a Magento 2 site I have. Every time I need to do some basic tasks it breaks or goes offline. So setup upgrade, compile, deploy etc. usually the site either breaks (missing CSS) or it goes into maintenance mode (e.g. if I run switch it to developer/production). This whole process takes approx. 5 minutes which is an eternity to wait when websites are down! So installing a plugin normally means the website goes offline. Changing a setting in the admin (e.g. turning minify css on) I assume I was told I need to switch to developer, compile, switch to production. So thats a lot of downtime for basic tasks. 

 

Is this normal? 

 

Or is there something seriously wrong with our Magento install? 

 

I also get errors as follows when running compile. 

 

 

Command returned non-zero exit code:
`bin/magento setup:static-content:deploy -f en_GB`

$ bin/magento setup:di:compile
The directory "/home/mysite/generated/code/Magento/Sales" cannot be deleted Warning!rmdir(/home/mysite/generated/code/Magento/Sales): Directory not empty The directory "/home/mysite/generated/code/Magento/Catalog" cannot be deleted Warning!rmdir(/home/mysite/generated/code/Magento/Catalog): Directory not empty

$ bin/magento setup:di:compile
The directory "/home/mysite/generated/code/Magento/Framework/View" cannot be deleted Warning!rmdir(/home/mysite/generated/code/Magento/Framework/View): Directory not empty

$ bin/magento setup:di:compile The directory "/home/mysite/generated/code/Magento" cannot be deleted Warning!rmdir(/home/mysite/generated/code/Magento): Directory not empty $ bin/magento setup:di:compile The directory "/home/mysite/generated/code/Magento" cannot be deleted Warning!rmdir(/home/mysite/generated/code/Magento): Directory not empty

 

 

The "cannot be deleted Warning" only runs once or twice and goes away if I keep running the compile command, as if it DOES delete it, but shows a warning anyway. 

 

I have other errors I have reported too, like this one https://community.magento.com/t5/Installing-Magento-2-x/Stripe-module-is-404-on-JS-files-but-they-ar.... I mean something is messed up there surely? I dont want to keep running the setup upgrade compile etc commands due to the downtime they cause. 

 

And this one I started to work through but I stopped because of the downtime I mentioned! https://community.magento.com/t5/Installing-Magento-2-x/Production-mode-404-s-all-min-files-do-not-e...