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

Large number of database connections #264

Open
YaBatman opened this issue Jan 18, 2025 · 1 comment
Open

Large number of database connections #264

YaBatman opened this issue Jan 18, 2025 · 1 comment

Comments

@YaBatman
Copy link

Edgy version: 0.24.2
Python version: 3.12

Hi there!
I'm using EDGE in conjunction with FastAPI and PostgreSQL, as well as pgbouncer for database connection pooling. When initializing the Registry, we specify poolclass=NullPool, since we're using pgbouncer to manage connections.

However, during production and load testing, we've noticed that EDGY is generating a high number of database connections, which is causing some issues. We'd like to find a way to reduce the number of connections so that we can optimize our system's performance.

We were wondering if there are any solutions available that could help us achieve this goal. For example, could we use decorators to ensure that all EDGY calls within an endpoint are executed within the same session? This would allow us to minimize the number of connection requests and improve the overall performance of our application.

@tarsil
Copy link
Collaborator

tarsil commented Jan 18, 2025

@devkral I believe you are better to handle this scenario

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants