Application timesout after around 10 mins but runs perfectly locally./

SupportProfSwo 31 Reputation points
2022-10-13T03:57:02.993+00:00

Python FastAPI app, that uses SQLAlchemy for connecting to a PostgreSQL DB.
The app spins up, but after less than 10min it is not reachable anymore.

(1) /health -> health check that does a “SELECT 1;" on the database to see if Postgres is alive.
(2) /v1/dashboard/1 -> returns data for our frontend
Scenarios:

  • We call endpoint (2) everything works. We can keep calling the endpoint. But if it is call 10min after the first request, the app fails.
  • We call (2) once, the health check (1) is executed continuously over a period longer than 10min (even several hours) and always returns OK. We call (2) once and the app crashes. The app does not have issue as long it runs on ContainerApps or if we spin it up locally on our machines. Seems to be an issue in the communication between AppService and our app.
Azure Database for PostgreSQL
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,903 questions
{count} votes