Graphic snapshot:

alt text

The green graph is heapUsed.

Black - heapTotal.

Blue - RSS.

HeadUsed has the shape of a saw: it grows and falls, i.e. memory is cleared. HeapTotal and RSS is growing constantly.

If you terminate all connections, then heapUsed will drop to 92mb, and HeapTotal and RSS will remain at ~ 1GB.

Schedule:

alt text

Why? Sign of a leak?

Thank.

  • Flowing, and what kind of code? Does it repeat if you make the simplest http server? (you can, for example, clone a large piece of data for the test) - zb '11

2 answers 2

If heapUsed does not grow, then most likely there is no leakage.

    There is an interesting post. How to fix a bug in Node.js ...

    In general, leaks for the node is not news, but we must look at the code.

    Perhaps your descriptors, sockets, etc. do not close somewhere.