Hello Mansi Gusain,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are having Startup probe failed error for your container app.
Yes, Even though you haven’t explicitly configured any health probes. Azure Container Apps automatically adds default health probes if none are configured. This includes startup, liveness, and readiness probes - https://learn.microsoft.com/en-us/azure/container-apps/health-probes
Also, the startup probe checks if your application has successfully started. If it fails, the container is killed and restarted according to the pod’s restart policy - https://kubebyexample.com/learning-paths/application-development-kubernetes/lesson-4-customize-deployments-application-2
However, your SQL query for the dashboard looks good for monitoring unhealthy replicas:
ContainerAppSystemLogs_CL
| where Reason_s == "ReplicaUnhealthy"
| summarize cnt = count() by Reason_s, ContainerAppName_s, dt=bin(TimeGenerated, 30m)
| project ContainerAppName_s, Reason_s, cnt, dt
| render timechart
So, to reduce or avoid errors you will need to configure custom health probes that match your application’s startup and runtime characteristics. This can prevent premature restarts, and you should use detailed logging and monitoring to understand why probes are failing. This can help you fine-tune the probe configurations. Then, make sure your container has sufficient resources (CPU, memory) to start and run properly. For an example on how you might configure a startup probe in your container app:
{
"containers": [
{
"image": "your-image",
"name": "your-container",
"probes": [
{
"type": "startup",
"httpGet": {
"path": "/startup",
"port": 8080
},
"initialDelaySeconds": 10,
"periodSeconds": 5,
"failureThreshold": 30
}
]
}
]
}
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.