1

On Magento Cloud, we noticed that each time we upload a code change to the master branch, running something like:

git push magento master

It runs some process and commands, and it takes many minutes. Sometimes it takes five minutes, and another take up to twenty minutes. In that time, the site is not accessible.

In some occasions, the changes we upload are minimal, some image or css change, or one line change of one file.

Someone know if is there some way that we could selectively upload these changes without the site being inaccessible for so long? Maybe omitting any of these processes that are executed, only when we don't see it necessary?

Thanks.

1 Answer 1

1

Well, I send a ticket to Magento, and they answered me this:

Hello,

What you are seeing is the normal workflow for Magento cloud. For any code change, you will need to push and the deployment process will take the site down. Here are the articles explaining this:

https://devdocs.magento.com/guides/v2.2/cloud/basic-information/starter-develop-deploy-workflow.html

https://devdocs.magento.com/guides/v2.2/cloud/basic-information/starter-architecture.html

Here is the article that discuss the deployment process, what are the 5 deployment phases and what scripts run during which phase:

https://devdocs.magento.com/guides/v2.2/cloud/reference/discover-deploy.html

The 5 deployment phases can be summarized into 2: The build phase and the deploy phase. During the build phase, your store is being built in a container separate from your cloud server so your site is not down. It is during the deploy phase where your site goes on maintenance mode since this is when the changes are being applied to your site. Whatever scripts running in this phase determine how long your site will be down for.

The usual script that takes a long time to run in the deploy phase is the static content deploy. The length of the deployment is determined by how many websites, stores, storeviews, locales, languages you have. That's why one way to lessen downtime is to move static content deploy from the deploy phase to the build phase so even if it runs for a long time, it doesnt affect the downtime of your site (since it's only in the deploy phase where your site is placed on maintenance mode).

If you want to try this, please read https://devdocs.magento.com/guides/v2.2/cloud/live/sens-data-over.html#cloud-confman-scd-over

Here are other links on static content deployment strategies:

https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-static-deploy-strategies.html

https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-static-view.html

https://devdocs.magento.com/guides/v2.2/cloud/env/variables-deploy.html#scd_compression_level

So, as I understand, it is normal and no, is no way to do it without that.

1
  • Hi @Eliacim DAVILA - CENSERE I was wondering how you are getting on with this now? What is the average length of downtime (if any) you see now when you push a change?
    – wr125
    Commented Jan 16, 2020 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.