Question

Im using Meck to simulate the behavior of some external services i have, purely for the sake of load testing and profiling my system, But it is causing me some issues. basically I have lots of worker processes being spawned, which then timeout after 10 seconds if nothing calls them, but when I have meck overriding the call to my external processes they seem to timeout and exit as expected, but they are never garbage collected, causing my applications memory usage to just keep going up and up as more workers are spawned

Was it helpful?

Solution

Seems this is due to how Erlang handles binaries and references: http://dieswaytoofast.blogspot.co.uk/2012/12/erlang-binaries-and-garbage-collection.html

my solution is to just have a macro defining the function which should be used, and switching that for a fake function at compile time, seems to work for now

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top