Problem while uploading image into azure

Rakesh 0 Reputation points
2025-05-10T20:24:57.84+00:00

I am trying to load my docker image which contain ai project into azure and the image is working properly on my local machine but when I am trying to upload the image into azure it is not working and showing 504 timeout and tried several ways and I can't run my application.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,757 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Suwarna S Kale 2,671 Reputation points
    2025-05-11T02:06:33.4633333+00:00

    Hello Rakesh,

    Thank you for posting your question in the Microsoft Q&A forum. 

    The 504 timeout error when deploying your Docker image to Azure, despite it working locally, typically stems from resource constraints, networking issues, or misconfigured health probes. First, verify that your Azure App Service or Container Instance has sufficient CPU/memory allocated local performance doesn’t guarantee cloud scalability. Ensure your Dockerfile exposes the correct port (e.g., EXPOSE 80) and that Azure’s health probe settings match your app’s readiness endpoint (/health or similar). 

    Next, check networking dependencies: If your AI project calls external APIs or loads large models, Azure’s default egress timeouts (4 minutes) may be insufficient. Adjust these in your deployment template or use Azure Monitor to diagnose bottlenecks. 

    Lastly, review container logs via Azure’s Log Stream or CLI (az container logs) for startup errors. If the issue persists, test a simplified image (e.g., nginx) to isolate whether the problem lies with your app or the Azure environment. For deeper debugging, enable verbose logging in your application and redeploy. 

    If the above answer helped, please do not forget to "Accept Answer" as this may help other community members to refer the info if facing a similar issue. Your contribution to the Microsoft Q&A community is highly appreciated. 


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.