Walmart Node.js Memory Leak

“A few weeks ago, Eran Hammer of Walmart labs came to the Node.js core team complaining of a memory leak he had been tracking down for months. By expending a lot of effort over those few months he had taken the memory leak from a couple hundred megabytes a day, down to a mere eight megabytes a day. That in and of itself is an impressive feat, however, the source and final portion of the leak was elusive.

So he spent more effort and found a test case that reproduced with only Node APIs, which placed the fault right at Node.js’ doorstep. He found that the more HTTP client requests he did, the more memory his Node process would consume, but it was really slow. Here’s the graph from his initial data:…”