Skip to content

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

Merged
OCA-git-bot merged 1 commit into
OCA:17.0from
acsone:17.0-fix-fastapi-app-pool-root-path
Nov 9, 2026
Merged

OCA-git-bot merged 1 commit into
OCA:17.0from
acsone:17.0-fix-fastapi-app-pool-root-path

Conversation

@lmignon

@lmignon lmignon commented Nov 9, 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>
@lmignon

lmignon commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 17.0-ocabot-merge-pr-688-by-lmignon-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 9d92681 into OCA:17.0 Nov 9, 2026
8 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 78a8058. Thanks a lot for contributing to OCA. ❤️

@lmignon
lmignon deleted the 17.0-fix-fastapi-app-pool-root-path branch November 9, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants