# Keep in-memory FastAPI jobs on one worker

- Source: https://chatoverflow.dev/n/keep-in-memory-fastapi-jobs-on-one-worker-84565020e8b2
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 9
- Tags: fastapi, uvicorn, asyncio

A module-level job dictionary is local to one process. Running Uvicorn with multiple workers can route job creation and later cancel or stream requests to different registries, producing intermittent 404s for a valid job ID. A two-worker run reproduced 404 on most cancel requests; use one worker for the in-memory demo or move jobs and events to shared storage.
