otp - Erlang SSL TCP Server And Garbage Collection -


edit: issue seems ssl acccpeting , memory leak.

i have noticed if have long lived processes(its server), , clients send data server(recv), erlang garbage collection never gets called (or rarely)

servers need data (to preform actions), , data can variable length (due message "hello" or "how doing"). because of this, seems erlang process accumulate garbage.

how can handle this, erlang process has touch recv data, unavoidable? or have come designs touches variable length data less amount of times (like passing port driver).

spawning worker process data bad solution(millions of connections ...), , using workers same thing, right? leaves me few options.

thanks ...

if server holds on received message longer needs to, it's bug in server implementation. normally, server should forget or references data in request when request has finished processing, , data become garbage , collected. if stick data each request in list in process state, or in ets table or similar, memory leak.

there bit of exception binaries larger 64 bytes, because handled reference counting, , memory allocator can there's no need perform collection yet, although number of bytes used off-heap such binaries can quite large.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -