Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting logs for Azure Container Instance that freezes

We have an Azure Container instance that seems to be freezing under heavy load. And we are able to cause this through a load test. I am not looking for the exact solution to that right now, but what I am confused about is that I can't seem to get any logs from the Container Instance when this happens that would tell me exactly what is going.

My instance is Docker container that runs a NodeJS application. I added Application Insights to the application, and have been successful in getting any exceptions that arise from the application itself. But when we experience the freezing behavior, it is not actually getting to the application inside the container, so Application Insights doesn't help me in this case.

Also, if I go to my Container Instance in Azure, and look under the Events tab, I am not seeing any kind of error, or anything really that would tell me my container instance is in a "not-working" state, even though we are not able to reach it.

like image 583
chuckw87 Avatar asked Oct 18 '25 13:10

chuckw87


1 Answers

You can use the Azure CLI command az container attach to check the container instance state and also the logs. There are three ways to get the different logs, see Retrieve container logs and events in Azure Container Instances. The restart policy will also help when the container instance gets some problems on it.

like image 156
Charles Xu Avatar answered Oct 20 '25 12:10

Charles Xu