4 ms·
I'm not super convinced. Wouldn't it be nicer if I can easily make it fail e.g. the current request, instead of crashing the process completely?
by nh2 7y ago
I'm not super convinced.
Wouldn't it be nicer if I can easily make it fail e.g. the current request, instead of crashing the process completely?
- toast0 7y agoTheoretically, sure. If you've got your process trees setup properly, anytime a process ran into a failed allocation, you could just kill that process and free its memory. And if an ets table insertion fails allocation, kill the requestor and the owner of the table. The problem is, I know for sure my supervison trees aren't proper; and i have doubts about the innermost workings of OTP --- did the things they reasonably expected to never fail get supervised properly? Will my code that expects things like pg2 to just be there work properly if it's restarting? How sad is mnesia going to be if it loses a table? I'm much happier with too much memory used, shut it all down and start with a clean slate.