Restarting xmCloud instances
This is a short article about how to restart the xmCloud instance, when necessary.
There are three ways to restart an xmCloud instance:
- Creating a new Deployment
- Restarting using Powershell
- Restarting using Sitecore cloud CLI
- Restarting using the xmCloud Deploy App
Restarting using Powershell
Try to avoid restarting an instance using PowerShell, because it has a rather large down time and it could take 3-8 minutes till the instance is ready for work again:
Restart-Application
command will recycle the application pool, and as mentioned before it needs time for the instance to be ready to use.
Restart using Sitecore cloud CLI
The Sitecore cloud CLI has a new restart sub-command for the environment. You need to have Sitecore.DevEx.Extensibility.XMCloud
version 1.1.73
or newer.
First, make sure you are logged in:dotnet sitecore cloud login
then run the restart for the environment:dotnet sitecore cloud environment restart -id [Your ENV ID] --verbose
It will restart the specified environment without having a downtime. I think in the background it will bring up a new pod in Kubernetes, warm it up and when it is ready it will switch it with the current environment.
Restarting using Deploy App
Go to the desired environment in xmcloud deploy app, and from the options choose restart:
It will give you a warning:
Click on Restart, it will follow the same procedure as the Sitecore CLI.
There will not be any downtime, It may take 3-8 Minutes for you to notice the restart is complete.
I hope we see some future UI improvement that indicates the restart is in progress and when it is done.
Summary
I really like the new CLI restart subcommand, because you can see what is happening and when the restart process is actually finished, unlike the deploy app UI which does not give you any indication that the restart is done, so kudos to the sitecore cli.