Node: Non-heap memory leak in node:10.15.3-alpine, node:10.16.0-alpine

Created on 8 Aug 2019  路  4Comments  路  Source: nodejs/node

Copied from https://github.com/nodejs/docker-node/issues/1082

We've witnessed a consistent memory leak in 2 versions of the node alpine Docker images: node:10.15.3-alpine and node:10.16.0-alpine. This leak may be present in other versions of the alpine images, but we know it is NOT present in node:6.11.1-alpine, node:8.16.0-alpine, node:10.15.3-jessie, and node:10.15.3-stretch.

This leak is a non-heap leak鈥攖he Node heap is not consistently growing, but the memory used by the docker container is.

Here is are some graphs demonstrating the leak across ~20 containers. The blue lines are the RSS of the docker containers and the red lines are the size of the Node heaps of the processes within each container.

node:10.15.3-alpine

node-10-15-3-alpine

node:10.16.0-alpine

node-10-16-0-alpine

node:10.15.3-stretch (no leak, for reference)

node-10-15-3-stretch

memory

Most helpful comment

was this ever resolved?

All 4 comments

Do you think you could figure out which version introduced this behaviour?

@mgartner It would help if there was either a consistent way to reproduce this, or if the change was nailed down to a more specific version range than v8.16.0...v10.15.3.
Another possible way forward: perhaps you could launch node with valgrind --tool=massif node to generate memory profiles? (Note: that will consume more memory).

we noticed the same using alpine-node:10.1 therefore we switched to node:10.1-stretch and you can notice the difference.

The docker image alpine-node:10.1 have been used till 8th of October.

docker_memory

was this ever resolved?

Was this page helpful?
0 / 5 - 0 ratings