Docker Web App/ R takes a long time to start

Adrian Capdefier 1 Reputation point
2021-05-10T08:40:47.82+00:00

Hi folks,

Hoping you can help and apologies if some of this doesn't make sense.

I have a very basic R app (one text box + one button) which I am trying to serve as a Docker Web App to internal users. I've built the image on ubuntu (FROM ubuntu) and rocker (FROM rocker/shiny-verse:latest) and for both of them I am getting very high initial start-up times (5-10 minutes or more) or 504 timeouts. Once the app loads one time, it easily reloads in the same browser window so I am assuming this time is due to the start-up times of the docker container.

Is this normal behaviour due to the service plan (I am using B2 SP with 3 manually configured instances) or a docker image issue? Is there a way to keep a docker web app "always running" or running between certain intervals?

I've tried googling similar issues but all the answers seem to address different uses of docker than the web app. I've also tried contacting support but hit the "automated" brick wall that says Microsoft is aware of an issue with the app and "no further action is required of me". I'm on a demo account due to practical considerations so I doubt they'll get back to me.

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
389 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,875 questions
{count} votes

1 answer

Sort by: Most helpful
  1. prmanhas-MSFT 17,886 Reputation points Microsoft Employee
    2021-05-12T07:21:24.497+00:00

    @Adrian Capdefier Apologies for the delay in response and all the inconvenience caused because of the issue.

    If you have a pinger style app, or if you use an external service to intermittently ping the app, that will keep the app up and running.

    Given you are running on a B2 instance (Basic 2), it can take a while to expand all of the layers needs to startup the container. The Basic tier (and the Standard tier as well) are not high-powered VM instances. Though at least in Standard tier there is an AlwayOn option that can be turned “on”, in which case the App Service platform will automatically handle pinging the app to keep it up and running.

    Hope it helps!!!

    Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.

    0 comments No comments