I use flask 2.2.2, gunicorn 20.1.0, sqlalchemy 2.0.13 without Flask-SQLAlchemy and oracledb 1.3.1. I have two scemas and two engines each for their own schema because they need different users to access. When I start app, and somebody makes request, sometimes i get error as on screenshot. How can i fix this problem? I tried to find solution in google, all links said that is oracle driver problem, but i can`t understand how to fix it.
I solved this problem. The problem is that sqlalchemy not thread/process safe. So i create app factory function and add engine.dispose(close=False) to this factory.