FastAPI endpoint timeout and client-disconnect cancellation: choosing a consistent strategy without a built-in setting
I have several long-running async endpoints in a FastAPI application (assume FastAPI 0.1xx on Starlette, served by Uvicorn) and I want requests to stop doing work when either a client disconnects or a time budget is exceeded. My understanding is that FastAPI exposes no per-request timeout setting, so the behavior has to come from somewhere else. The pieces I