bitmark-inc/bitmarkd

Memory leak

Closed this issue · 2 comments

Starting from 0.12, it seems that there is a memory leak in bitmarkd.

Memory growing behavior comes from 2 reasons:

  1. When using third party library connecting to crypto network, it default assumes connection will success and have retry behavior pretty fast, thus causes some memory like in socket level if connection cannot be done.

  2. Go's memory optimization strategy has changed somehow in newer version, it now defaults to preserve as many memory as possible, causes memory usage grows high on some high memory machine. Some offices nodes runs in jail, which defaults that each container can see all memory of the system, thus each node has wrong assumption of usable memory, when OS cannot provide that much memory to each node, crash happens.

For 1, it has been fixed on version 0.12.4-beta.4, for 2, environment variables has been changed so that each node can see only 2G memory.

hxw commented

0.12.4 deployed