Azure docker web linux apache app keeps restarting

RobertTheBruce 51 Reputation points
2024-04-15T21:17:48.6966667+00:00

I have a web app based on a Dockerfile. It is set to Continuous Deployment and is Healthy. It is a B1 with 1 instance. I can browse my pages, but it frequently is very slow for a few seconds and if I look at the logs it is restarting. There is no docker image to pull (from Github). Here's an excerpt from the Log Stream with some details changed.

2024-04-14T23:59:41.092Z INFO - Status: Image is up to date for ghcr.io/ggggg

2024-04-14T23:59:41.108Z INFO - Pull Image successful, Time taken: 0 Seconds

2024-04-14T23:59:41.155Z INFO - Starting container for site

2024-04-14T23:59:41.162Z INFO - docker run -d --expose=80 --name mysite_516_61ff855e -e WEBSITE_USE_DIAGNOSTIC_SERVER=false -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=mysite -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=mysite.azurewebsites.net -e WEBSITE_INSTANCE_ID=40b45f0624d0dbfccd23ea62135551a8ccc3170eb13646b7781105e7501c4119 -e HTTP_LOGGING_ENABLED=1 ghcr.io/ggggg

The Dockerfile is farily simple


FROM php:8.3-apache

etc

EXPOSE 80

CMD ["apache2-foreground"]

One thing I don't understand is the random health check url which gets a 404. I have an actual health check configured which returns 200 and I can also see in the log stream. I wonder if it is restarting as it thinks it is unheathy?

"GET /robots933456.txt HTTP/1.1" 404 4745 "-" "HealthCheck/1.0"

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
325 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,268 questions
{count} votes