Skip to content

[16.0] [FIX] fastapi: pool apps by endpoint root path, not request path - #675

Open
lmignon wants to merge 1 commit into
OCA:16.0from
acsone:16.0-fix-fastapi-app-pool-root-path
Open

lmignon wants to merge 1 commit into
OCA:16.0from
acsone:16.0-fix-fastapi-app-pool-root-path

Conversation

@lmignon

@lmignon lmignon commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

FastApiDispatcher passed the full request path as the key of the app pool. Every distinct path under an endpoint, including unknown paths and path parameters, built and kept its own FastAPI application until the registry cache was invalidated, so worker memory grew with the number of distinct paths requested, even unauthenticated ones.

Resolve the endpoint's root path once per request and use it as the pool key and for the uid lookup.

Fixes #656

Assisted-by: Claude Opus 5.5

Backport #670

FastApiDispatcher passed the full request path as the key of the app
pool. Every distinct path under an endpoint, including unknown paths
and path parameters, built and kept its own FastAPI application until
the registry cache was invalidated, so worker memory grew with the
number of distinct paths requested, even unauthenticated ones.

Resolve the endpoint's root path once per request and use it as the
pool key and for the uid lookup.

Fixes OCA#656

Assisted-by: Claude Opus 5.5
Signed-off-by: SparkDrago05 <huzaifa.farooq05@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants