I see a lot of questions where people go "aw my gawd memory leak!" based on the first few minutes of the app running, without waiting to see if the process hits a ceiling or actually runs out of memory. Node just uses as much memory as allowed to.
See the following rough benchmark. I ran your code (with a timeout of 100 instead), and the memory-usage rapidly increased to ~70 MB, but then stopped. The first column is memory usage.
27368 0:00.36 node test.js
40644 0:00.82 node test.js
47468 0:01.21 node test.js
48192 0:01.40 node test.js
67952 0:02.39 node test.js
69448 0:03.29 node test.js # Increasing fast til around here
70016 0:04.46 node test.js
70624 0:07.43 node test.js
70944 0:10.59 node test.js
71612 0:13.63 node test.js
73120 0:16.83 node test.js
70864 0:18.17 node test.js # Look it's decreasing
67780 0:42.27 node test.js # Considerably later it's even lower!
My guess at why it's like this would be because garbage collection is expensive, but I'm not sure and would be happy if anyone had a real explanation and references.