Azure Container Instance container stuck in Waiting state

Max Ackley 30 Reputation points
2025-05-09T17:21:17.3833333+00:00

We're deploying an some ACI container via Bicep deployment scripts, but some of the containers are fairly consistently getting stuck in the Waiting state. It seems intermittent when this will happen because some of the containers (using the exact same configuration/script) will run to completion.

There are no container logs because it never gets to the point of execution before timing out.

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
757 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Pramidha Yathipathi 1,135 Reputation points Microsoft External Staff Moderator
    2025-05-09T18:33:36.8633333+00:00

    Hi Max Ackley.

    Check Resource Availability: Ensure that the region where you're deploying your containers has sufficient resources available. Azure regions can experience capacity constraints, leading to deployment failures. Consider deploying your containers in a different region if the current one is under heavy load.

    Review Quota Limits: Verify that your Azure subscription hasn't reached its quota limits for resources like CPU, memory, and container groups. You can check your current usage and request quota increases if necessary.

    Inspect Container Logs: Use the Azure CLI to retrieve container logs and events to identify any error messages or events about image pulling, networking, or other container-specific problems:

    az container logs --resource-group <resource-group-name> --name <container-group-name>
    

    Simplify Deployment: If you're deploying multiple containers simultaneously, try deploying them sequentially or in smaller batches to avoid overwhelming the system.

    Consider Spot Containers: If you're using Spot containers, be aware that they can be evicted at any time due to capacity adjustments. If your containers remain in the "Waiting" state, it might be due to underlying Spot virtual machine evictions. Consider deploying your containers during off-peak hours or using standard containers if eviction is a concern.

    Please refer the document below:

    https://learn.microsoft.com/en-us/azure/container-instances/container-instances-resource-and-quota-limits

    https://learn.microsoft.com/en-us/troubleshoot/azure/azure-container-instances/configuration-setup/spot-container-group-quota-reached-error

    https://learn.microsoft.com/en-us/troubleshoot/azure/azure-container-instances/management/spot-containers-remain-waiting-state

    If you found information helpful, please click "Upvote" on the post to let us know.

    If you have any further queries feel free to ask us we are happy to assist you.

    Thank You.

    0 comments No comments

  2. Max Ackley 30 Reputation points
    2025-05-12T17:31:21.98+00:00

    The issue seems to be resolved. I had some conflicting deployment scripts were likely causing the issue due to using the same name in the Bicep module. They were probably competing over the same container instance and the first one to finish would clean up the resource causing the other to hang.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.