gino-starlette
gino-starlette copied to clipboard
DB connection for request is not released when there are more than one database
With use_connection_for_request=True and two DBs:
db1.init_app(app)
db2.init_app(app)
And in the fastapi router, query db1 and db2.
- Call the api
- Change file contents to make it reload
- Try exiting
Then you'll see the server gets stuck.
I guess the problem is in _Middleware, when setting scope, one connection overrides another.