This is one of the most frustrating errors. The App Service starts giving this error once it restarts. I have written a simple app.py and requirements.txt. No Docker containers were used.
app.py
from flask import Flask
app = Flask(name)
@Muhammad Shoaib .route('/')
def index():
return 'Web App with Python Flask!'
app.run()
requirements.txt
Flask==2.0.2
Followed exact same steps mentioned here:
https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package
for bash, passed the right names of RG and app service.
Still it gives the same error again and again
2022-07-07T11:27:52.622Z INFO - Starting container for site
2022-07-07T11:27:52.623Z INFO - docker run -d --expose=8000 --name *********_0_655c5698 -e WEBSITE_SITE_NAME=******-e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=******.azurewebsites.net -e WEBSITE_INSTANCE_ID=7505105c99ac83d562156ed90505e27f8a145a990ef91c6ebaddedad548660d4 -e WEBSITE_USE_DIAGNOSTIC_SERVER=True appsvc/python:3.9_20220315.5
2022-07-07T11:27:52.626Z INFO - Logging is not enabled for this container.
Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2022-07-07T11:27:56.384Z INFO - Initiating warmup request to container *******_0_655c5698 for site ******
2022-07-07 11:28:02,298 [MainThread] [DEBUG] : Initializating AppServiceAppLogging
2022-07-07 11:28:02,301 [Thread-1 ] [DEBUG] : Did not find any previously bound socket
2022-07-07 11:28:02,302 [MainThread] [DEBUG] : Initialized AppServiceAppLogging
There is no good documentation supporting this error