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

PostgresSQLConnection does not seems freed (memory leaks?) #18263

Open
eslym opened this issue Mar 18, 2025 · 0 comments
Open

PostgresSQLConnection does not seems freed (memory leaks?) #18263

eslym opened this issue Mar 18, 2025 · 0 comments
Labels
bug Something isn't working performance An issue with performance sql Something to do with `sql` in the "bun" module

Comments

@eslym
Copy link

eslym commented Mar 18, 2025

What version of Bun is running?

1.2.5

What platform is your computer?

Linux a228628fd653 6.6.31+rpt-rpi-2712 unknown

What steps can reproduce the bug?

create a website using drizzle-orm + bun:sql, run for a day

// not sure the options affect or not
new SQL(env.DATABASE_URL, {
    idleTimeout: 3,
    connectionTimeout: 3
});

What is the expected behavior?

the PostgresSQLConnection Object should be freed, at least not this much.

What do you see instead?

Image

Additional information

I do check from the postgres database, there is no active connection from the website, those connection already closed

Update:
After few trying, can confirm this issue will only happens when idleTimeout is set, the closed connection does not freed properly, the memory usage seems normal when the connection is presistent (no more connection created)

@eslym eslym added bug Something isn't working needs triage labels Mar 18, 2025
@RiskyMH RiskyMH added performance An issue with performance sql Something to do with `sql` in the "bun" module and removed needs triage labels Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance An issue with performance sql Something to do with `sql` in the "bun" module
Projects
None yet
Development

No branches or pull requests

2 participants