Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have only one instance of engine connection to Postgres #551

Open
kongzii opened this issue Nov 11, 2024 · 0 comments · May be fixed by #555
Open

Have only one instance of engine connection to Postgres #551

kongzii opened this issue Nov 11, 2024 · 0 comments · May be fixed by #555
Assignees
Labels
bug Something isn't working high priority

Comments

@kongzii
Copy link
Contributor

kongzii commented Nov 11, 2024

Currently, we are using create_engine from sqlmodel on many places (just search for create_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.

@kongzii kongzii added bug Something isn't working high priority labels Nov 11, 2024
@gabrielfior gabrielfior self-assigned this Nov 11, 2024
@gabrielfior gabrielfior linked a pull request Nov 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants