4 ms·
What actually BEAM protect you against resources consumption ? If you set o timeout all you process will be up and idle.
by Thaxll 6y ago
What actually BEAM protect you against resources consumption ? If you set o timeout all you process will be up and idle.
- dnautics 6y agoDefault BEAM timeout is usually 5s (probably too long, in some cases), if you miss it the default is unhandled exception, which crashes the process that made the call (and only that process, no others). The VM will then recover all of the resources (file descriptors, sockets, data to be GC'd) associated with that process. All in zero lines of code. Also you can have millions of processes per core, with minimal performance regression, do you're likely to notice it in monitoring before it becomes a problem.