<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<br class=""><br class="">I am trying to debug what looks like a memory leak of about 6GB per week (~10kB/s).<br class="">The node in question gets data from Kafka and Redis, processes it and puts the result back in Redis (~1MB/s in, 0.9MB/s out).<br class=""><br class="">When I log into the node I see erlang:memory() reporting 14,6 GB of memory basically all attributed to "system".<br class="">Digging deeper recon_alloc:memory(allocated_types) finds that basically all the memory is allocated by "driver_alloc".<br class=""><br class="">I tried a few things that did not change anything:<br class="">- force GC on all processes<br class="">- restart the main application<br class="">- stop all applications except the bare minimum<br class=""><br class="">I thought maybe it is NIFs leaking memory so I tried to run them in isolation for around 30 CPU minutes each encoding/decoding or compressing/decompressing. They all seem fine.<br class="">Here is a list of them:<br class="">snappy: <a href="https://github.com/fdmanana/snappy-erlang-nif" class="">https://github.com/fdmanana/snappy-erlang-nif</a>(c4cd1bb35f3a3a399737d64bd03b479817b90e75)<br class="">jsonx: <a href="https://github.com/odo/jsonx" class="">https://github.com/odo/jsonx</a> (435fc3e9df5c33bf307fa8c95da7a18b07ea49a7)<br class="">lz4: <a href="https://github.com/szktty/erlang-lz4.git" class="">https://github.com/szktty/erlang-lz4.git</a> (bdbfbedc89c073cd154de5a0691a198be43c539b)<br class=""><br class="">I don't fully understand what driver_alloc contains and what could drive its growth.<br class="">Any thoughts?<br class=""><br class="">Thanks, Florian</body></html>