Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Node.js Agent Memory Leak


For the issue I was facing disabling SSL in the configuration stopped the idle leaking issue. The problem appears isolated to how SSL certs are stored in memory and the NewRelic team are actively looking into it.

As a workaround you can add the below options to your newrelic.js:
port: 80,
ssl: false,

However note this isn’t a secure configuration and so the data being sent to NewRelic can potentially be compromised so keep this in mind before going with this change.


Thanks for the heads up! That seems to work, but it’s not an acceptable workaround for us in production.

Do you know if there’s an ETA for this fix?

Is there another workaround for this? E.g. running an HTTP proxy that’d forward requests over HTTPS ?


We’re investigating, but don’t currently have an ETA to share regarding the issue. We will follow up with additional information as we have it. If you do implement a workaround that functions for you, please share it here!


I moved 3 posts to a new topic: Memory leaking only with Node.js agent installed


The issue is back! Since Node 0.12 with latest version of mongoose and express the memory grows fast on Heroku, within 2-3 minutes more than 500MB memory and soon enough R14s.


+1. Currently experiencing these issues as well.


I can’t use NewRelic with this issue. This is crazy for a company like NewRelic to not fix this issue that impacts all their customers (with a Node.js application).


Hi all - I don’t have an update at this point; however, I wanted to ensure you all knew about this thread that did have an engineer respond. We are actively investigating this issue which appears to be in Node core.


Is the leak still not a priority?


The memory leak problem is really annoying with Heroku’s free tier which limits the memory usage to ~512MB. Disabling the SSL seems quick fix, but it’s not usable in production environment.
Does this issue occur with older Node engines 0.11, 0.10 ? Seems like the issue solving on the Node side takes some time, what would NR team suggest until the fix ?


Hey guys - Wraithan has responded again in the other thread:

I’d recommend subscribing to that for updates. Using an older version of Node may work but I have not tested it - if you have an environment to test in that may well be worth it.


+1. Currently experiencing these issues as well.


The recent update, 1.18.x claims to have fixed the memory leak however I am seeing no improvement. See attached image. I turned on newrelic with 1.18 at midnight and then turned off at 9am this morning.


@andrewbarba Thanks for posting that. I’m going to open a support ticket on your behalf so we can investigate this further with you to see why you’re still seeing this big increase in memory usage.

It’s also important to clarify that version 1.18 of the Node.js agent doesn’t “solve” the memory problem, as the memory problem is actually in Node.js core. Instead, we mitigated the impact of this unresolved Node.js core bug on the agent.


Hello all! We have a new post on this particular issue that may be of interest. You can find it here:


I’m also having this problem. I’m afraid I’m going to have to move on from new relic because I need to restart my application every few hours these days. Have any recent node versions fixed the issue?


You should move on from new releak…


@hampzan09 I will get someone from our support team to reach out to you and create a ticket to investigate. The only leak condition that we are currently aware of is the one described in this post which is actually in issue in pg-pool for which we have produced a PR to that repository to address it. As in this case, we often find that leak conditions are actually the result of leaks in other libraries or modules that are simply exacerbated by the agent’s instrumentation. But we’ll need to collect some additional information to investigate the cause in your particular situation.


Today 3/14/2018. Are we still having same Node.js memory leak issues.

here is the link from NewRelic, has any one used these setting in PROD environment?
We are running Node.js on cluster mode.

There are several possible causes for this memory increase and potential solutions for each.

Show All

Increase caused by SSL/TLS

Increase caused by TLS memory buffer allocation

Increase caused by cluster worker slab allocations

Increase caused by log messages stored to disk

Increase caused by leaked MongoDB cursors

Increase caused by agent data storage


Hi @ramesh.palipi !

Because we may need to discuss private information to resolve this, I am going to put you in-touch with our Support Team privately.

Look out for an email and let us know when you get all sorted. Thanks!