17

We run Java Spring Boot app in a Docker on Azure WebApp for Containers. Single B1 instance is enough for the app to run, however Spring Boot is pretty slow at startup and might take over 240 seconds for the app to start.

As the result Azure WebApp for Containers kills the container after 240 seconds not giving it enough time to start.

Is there any way to change the default 240 seconds startup timeout?

Sean McKenna
  • 3,706
  • 19
  • 19
Sergey Kandaurov
  • 2,626
  • 3
  • 24
  • 35
  • 1
    We could get the answer from this [document](https://learn.microsoft.com/en-us/azure/app-service/containers/app-service-linux-faq) – Tom Sun - MSFT Jul 06 '18 at 08:31

1 Answers1

37

Yes, you can configure the amount of time. Set the WEBSITES_CONTAINER_START_TIME_LIMIT App Setting to the value you want.

Default Value = 230 Sec.

Max Value= 1800 Sec

AjayKumar
  • 2,812
  • 1
  • 9
  • 28
  • We have got this information added in the Azure docs, adding here for reference: [Environment variables and app settings in Azure App Service](https://learn.microsoft.com/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet#custom-containers) [App Service Linux FAQ](https://learn.microsoft.com/troubleshoot/azure/app-service/faqs-app-service-linux#my-custom-container-takes-a-long-time-to-start--and-the-platform-restarts-the-container-before-it-finishes-starting-up-) – AjayKumar Dec 13 '22 at 12:12
  • Is there any information on how to diagnose why a given container might suddenly change from taking 120s to 760s to start up? – Ben Ketteridge Dec 13 '22 at 15:53
  • does this workd on Windows app service? I add this with 1800 value but the app still restarts on 230 secs. – CageE May 16 '23 at 11:47