joyent/node — Issue #2468: Receiving UDP packets retains memory
Author: quirkey
Created: 2012-01-05 16:47:33+00:00
State: open

We recently tried to upgrade our node statsd instances to v0.6.6 (from v0.4.12) and quickly noticed that the process was growing indefinitely once it started receiving packets. We reverted and I've spent some time trying to track it down in the code. Eventually I narrowed it down to this simplified test case:

https://gist.github.com/5a83080df20211e8ff74

Even without doing anything with the received messages, 0.6.6 quickly grows in memory per-packet received. The real kicker is it doesnt release this memory even after a long period of 0 sent. This was not a problem in 0.4.

I've tested this on centos 6 and locally on OS X 10.7.2.

I couldn't find anything obvious in the dgram.js so I'm guessing its in the lower level.