Let me ask my question as simple as shown below. Mine is the network router software built into erlang, but under a certain scenario I can see very high memory growth as shown by VM.
I have one process that receives a binary package from another process from a socket.
This process parses the binary package and passes the binary package gen_server (handle_cast is called)
Gen_server again saves some information in the ETS table and sends the packet to the peer server.
When the peer server responds, the record from the ETS is deleted and gen_server responds to the first process
Also, if the first process (which sent the gen_server packet) receives a timeout after 5 seconds of waiting for a response from gen_server, it also deletes the ETS record in gen_server and exits.
Now I observe a high memory growth when many events fail (due to the inaccessibility of the peer server) and from the fact that I examined its "** binary **" and "** process_used **" given by the erlang: memory command using most of the memory.
but this is not the case when events are successfully processed.
source share