Azure Web App Timeout: Telegram Bot Deployment
I have a Telegram bot built with Python and Pyrogram, which is deployed on an Azure Web App. Initially, the bot worked fine, but it stopped responding after some time. The Azure Web App logs indicate that the container failed to start within the expected time limit (WEBSITES_CONTAINER_START_TIME_LIMIT). The logs show that the Gunicorn server, running the Flask app, started successfully but encountered timeout errors, terminating the worker process after around 10 minutes. This cycle repeated until the Azure Web App timed out after 30 minutes, indicating that the app wasn’t responding to HTTP requests within the configured time limit. Strangely, about 30 minutes after encountering these timeouts, the bot started working again without any changes to the code or configuration.