Deploy Dash Apps with heavy code (packages and code)

Thea Lund Jørgensen 40 Reputation points
2023-12-07T12:57:01.7066667+00:00

Hi,

I am not very experienced in deploying tools, so I am not sure what information I need to provide.

I have an an Azure subscription, where I am deploying web apps. The web apps are dash applications with python code and I deploy using docker-image.

Until now the web apps have worked fine. I created a new application with heavier python packages and more demanding python code. When I deployed the app, it worked fine. There was some downtime occasionally, but overall it worked fine.

However, now I have created more web apps, with heavier packages and code as well. I can deploy them, but when I try to use any of them or my first heavy app (which worked when it was the only heavy one), it takes a long time for the URL to work. In the log-stream it looks like it re-collects the docker-image every time I go to the app. This causes a big delay for when the app is ready for use.

Do you have any guides or ideas on how I can solve this issue?

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,173 questions
{count} votes

Accepted answer
  1. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2023-12-08T09:43:32.5866667+00:00

    @Thea Lund Jørgensen , Thanks for posting this question. What App Service Plan (ASP) are you leveraging?

    Firstly, just to highlight, Azure App Service represents a fleet of scale units. An app service always runs in an ASP.

    1.You can configure the amount of time the platform will wait before it restarts your container. To do so, set the WEBSITES_CONTAINER_START_TIME_LIMIT app setting to the value you want.

    --The default value is 230 seconds, and the maximum value is 1800 seconds.

    2.As a quick step to isolate the issue: Turn on Always On and test. (If you haven't done this already)

    You may scale-up the App Service Plan and see if it helps. ( you may later scale-down post test, as required)

    When Always On isn't turned on (default), the app is unloaded after 20 minutes without any incoming requests. The unloaded app can cause high latency for new requests because of its warm-up time. When Always On is turned on, the front-end load balancer sends a GET request to the application root every five minutes. The continuous ping prevents the app from being unloaded.

    Additionally,

     3.You may always leverage App Service diagnostics from Azure Portal> Navigate to your App Service app in the Azure Portal.
    -In the left navigation, click on Diagnose and solve problems - Review and run - “Availability and Performance”  and - “Configuration and Management”

    4.Enable and review logs to fetch more details about the issue.

    Kindly let us know, I'll follow-up with you further.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.