Skip to content

Memory leak #597

Closed
Closed
@davetapley

Description

@davetapley

I'm getting a rather substantial memory leak, and I've isolated it to node-postgres, I don't know much more than that at the moment. It doesn't appear related to connection failures, so I believe it's different to #417.

Here's my initial repro on GitHub:

  1. Create a new Heroku app.
  2. heroku addons:add heroku-postgresql so we have a DB to connect to.
  3. heroku labs:enable log-runtime-metricsso we can see the dyno memory usage.
  4. Clone my test repo.
  5. Push the test repo to the Heroku app.
  6. heroku ps:scale work=1 to start doing work.
  7. heroku logs --tail and watch for the sample#memory_rss output from the runtime metric lab.

If you heroku addons:add librato, wait a little, then heroku addons:open librato, you can see a graph of the leak, like this:

selection_147

(that's 60 MB in < 20 mins for a script which does nothing but connect!)


Details:

Heroku version 9.3.3
node-postgres version 3.1.0 (using native, as I need SSL, per #25)
node 0.10.28

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions