question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Potential memory leak in Pool

See original GitHub issue

Hi,

I have a use case where I run quite a lot of batched queries against Postgres (thousands). I recently ran into memory issues on my worker machine and could trace the issue to an apparent memory leak somewhere in the connection pool.

So far it’s just an observation, I didn’t build a proper test case yet. But the memory issue went away when I switched from using a connection pool to single-use connections.

Did anyone notice this too? Seems like a recent issue IMO.

I’m using "pg": "^8.7.3" and "pg-native": "^3.0.1"

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
brianccommented, Sep 27, 2022

I need self-contained script/file with reproduction case to investigate this. Otherwise there are too many factors involved to pin any memory leak down on pg itself.

0reactions
ShadowLeicommented, Oct 4, 2022

Switched to latest version ^8.8.0 & had a try, there’s not much memory taken by “PendingItems”, but still lots of objects produced (the chrome inspector shows the total objects from 700+ raised up to 500K+)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Potential memory leak in web application code
This monitor looks at events logged when the application pool is recycled due to exceeding the configured memory thresholds and will change its...
Read more >
Understanding Memory Leaks in Java - Baeldung
A Memory Leak is a situation where there are objects present in the heap that are no longer used, but the garbage collector...
Read more >
IT41988: POTENTIAL MEMORY LEAK/ABEND DURING ... - IBM
Bring the reclamation-eligible copy storage pool volumes onsite and perform MOVE DATA operations against these volumes to reclaim unused space.
Read more >
"POTENTIAL MEMORY LEAK FOR PROCESS: w3wp"
Do you have any tips on the warning, "POTENTIAL MEMORY LEAK FOR ... Then you can know the application pool in worker processes...
Read more >
Potential Non-Pagable pool Memory leak - AVG Support
After some investigation into processes, it came to my attention that my memory would slowly reach 100% usage after a while of running....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found