Open kongzii opened 1 week ago
Currently, we are using create_engine from sqlmodel on many places (just search for create_engine in PMAT and PMA), however, according to docs:
create_engine
sqlmodel
> You should normally have a single engine object for your whole application and re-use it everywhere.
The problem we started to see is that Postgres is erroring out, because too many connections are open.
I did a quick fix here, hopefully it will help, but this issue is still good to be implemented.
Currently, we are using
create_engine
fromsqlmodel
on many places (just search forcreate_engine
in PMAT and PMA), however, according to docs:> You should normally have a single engine object for your whole application and re-use it everywhere.
The problem we started to see is that Postgres is erroring out, because too many connections are open.
I did a quick fix here, hopefully it will help, but this issue is still good to be implemented.