You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using the application, the database connection gets still sooner or later. The root cause relies here in the multithreaded environment of FastAPI
Describe the solution you'd like
Replace Peewee ORM with SQLAlchemy
Describe alternatives you've considered
There exists a possibility to do an auto-reconnect for certain db related errors. But in my opinion this just hides the real issue. In some cases it might solve the users need, but it is not very reliable.
Additional there is a peewee-async project that can handle it. But reworking the backend to fit the async dependency is just at least the same effort as replacing it with SQLAlchemy. Considering if a library will be maintained in the future, I would rather bet with SQLAlchemy than peewee-async
tjbck
changed the title
Replace Peewee with SQLAlchemy due to multithreading issues
enh: Replace Peewee with SQLAlchemy due to multithreading issues
Jun 17, 2024
Is your feature request related to a problem? Please describe.
When using the application, the database connection gets still sooner or later. The root cause relies here in the multithreaded environment of FastAPI
Describe the solution you'd like
Replace Peewee ORM with SQLAlchemy
Describe alternatives you've considered
There exists a possibility to do an auto-reconnect for certain db related errors. But in my opinion this just hides the real issue. In some cases it might solve the users need, but it is not very reliable.
Additional there is a peewee-async project that can handle it. But reworking the backend to fit the async dependency is just at least the same effort as replacing it with SQLAlchemy. Considering if a library will be maintained in the future, I would rather bet with SQLAlchemy than peewee-async
Additional context
tiangolo/fastapi#1019 (comment)
The text was updated successfully, but these errors were encountered: