Closed m0wer closed 5 months ago
I understand this has something to do with starlette and fastapi way of handling middleware, I could re export the middleware as route handler, but it doesn't fit the actual purpose of the route handler, I will close it since it doesn't relate to the actual utilities provided
Describe the bug A clear and concise description of what the bug is.
Full Traceback:
To Reproduce Enable the timing middleware and use fastapi >=
0.90.0
(0.89.1
is the latest version where the error does not occur). Then call multiple endpoints concurrently and wait. The error does not always happen, but it's not hard to reproduce it with enough ~50-200 concurrent requests.Expected behavior The error should not happen.
Environment:
alpine:3.12
)Additional context
Does not happen for previous versions of FastAPI or with the latest version
0.92.0
and the timing middleware disabled.https://www.starlette.io/release-notes/ https://github.com/tiangolo/fastapi/releases
Something to look at (but might not be the cause since with starlette 0.23.0 it does already fail):
Might be related to https://github.com/dmontagu/fastapi-utils/issues/266.