<div dir="ltr">Hello,<br><br>I have an erlang application which is reading jobs from a gearman queue and call some HTTP url's (send's notifications over http).<br>Beside this also saves some states in a redis/mysql database. <br>Everything performs very nice excepting the fact that memory is increasing like crazy and get never released.<br><br>The project is using the following deps:<br><br>1. Lager<br>2. hackeny - for the HTTP requests<br>3. econfig<br>4. folsom <br>5. emysql<br>6. mero<br>7. jsonx<br>8. tempo<br>9. erlang_gearman<br><br>When I start the app it's starting with several hundred of MB but in 20 days is going to over 1.5 GB and still increasing if I don't restart the process. <br><br>recon_alloc:memory: <br>    allocated -> shows at this moment 1454477752<br>    used -> 1351474280<br><br>From what I see 95 % of memory is on the binary_alloc. Fragmentation for this allocator is looking like:<br><br>recon_alloc:fragmentation(current).<br><br>[{{binary_alloc,1},<br>  [{sbcs_usage,1.0},<br>   {mbcs_usage,0.9404540505595212},<br>   {sbcs_block_size,0},<br>   {sbcs_carriers_size,0},<br>   {mbcs_block_size,691837288},<br>   {mbcs_carriers_size,735641776}]},<br> {{binary_alloc,2},<br>  [{sbcs_usage,1.0},<br>   {mbcs_usage,0.9441229925677996},<br>   {sbcs_block_size,0},<br>   {sbcs_carriers_size,0},<br>   {mbcs_block_size,567818272},<br>   {mbcs_carriers_size,601424048}]},<br><br>I also tried to run the GC over all processes but nothing changing :(<br><br>erlang:memory(total). => 1350813872<br><br>[erlang:garbage_collect(Pid) || Pid <- processes()].<br><br>erlang:memory(total). => 1347613584<br><br>I have no idea on how to identify where all this memory goes.. The sum of all processes as displayed by Observer app in the Process tab is insignificant.<br><br>Any advice ? <br><br>Silviu<br></div>