Azure ACI: why perform maintenance operations
This application is designed to be highly resilient and does not require many maintenance operations. However, in some situations, you may need to restart the ACI (Azure Container Instance) to update your application version and benefit from the latest patch releases.
In some cases, for example if an error occurs during data processing, some files created for the operation may not be deleted. They can accumulate and fill up the allocated volume. This issue can usually be fixed by stopping and restarting the app.
Warning: this article does not describe maintenance operations for the Azure gateway or routing configuration you may have set up in your environment, as these configurations can vary significantly from one customer to another.
When to operate
Data processes failed
The first signal that your application may need maintenance is when some data processes launched from Salesforce end with a Failed status. Before checking your Azure platform, make sure the error description does not indicate an issue elsewhere. For example, if you built your own deduplication rules, some errors may occur and stop the process.
For example, if you check your Salesforce Lightning application DQE One, open the Runs tab, and find a failed run as shown below, you may need to restart your Azure Container Instance.
Data processes pending
Sometimes, the job queue can get stuck on the same message and block data processing. In this situation, clear the file share allocated to the RabbitMQ container and reload the application. This should fix the issue in most cases.
If the file share linked to the RabbitMQ container is public, you can access it through the Azure portal and delete its contents.
If the file share is private, you need to access the container and manually clear the RabbitMQ directory. If the container is running, proceed as follows:
- Log in to the container.
-
Delete the following file:
/bitnami/rabbitmq/mnesia/rabbit@localhost/msg_stores/vhosts/ - Stop the app and restart it from the overview panel.
How to proceed
Get the logs
The logs are stored for 30 days by default in the Log Analytics Worker previously created. To retrieve them, follow these steps:
- Go to the Log Analytics Worker, then open the Logs tab:
-
Export the results of this command to CSV:
ContainerInstanceLog_CL | project TimeGenerated,ContainerName_s,Message | where ContainerName_s == "one-server" or ContainerName_s == "queue-worker" | sort by ContainerName_s asc, TimeGenerated asc
Rebuild the app
If you need to redeploy a newer version, or simply clear the volumes used by your application, you may need to stop the containers.
Go to the Overview tab and click Stop. Once the server has stopped, click Start. This will pull the latest release, labelled with the tag you provided in the configuration file, and rebuild the whole application.
This will also clear any volume previously used by this application.
Restart
- Restart the Azure Container Instance.
Go to the Overview tab and click Restart. - Monitor the container reload.
All containers should end up in the Running state.
If any container has the Terminated status, something went wrong and you should contact support. Otherwise, your server has restarted successfully.
Image registry credentials update
- Go to the YAML file.
- Update the login and password in the file, then save it.
- Run the following command based on the latest YAML file:
$ az container create -g <your Resource Group Name> -f <.yaml file path>
Related to