[erlang-questions] file:write/2 blocking indefinitely
Fri Oct 25 23:51:11 CEST 2013
I've been having this odd issue lately with a system. I have a file opened with
file:open (File, [ write, raw, compressed ])
Held in a gen_server state, and send message which are then written to the file with
file:write (FileHandle, Bytes)
However, every so often, the file:write/2 call just stops working and essentially blocks.
This causes the mailbox of the gen_server to slowly fill up and eventually the node runs out of memory. We currently work around this issue, but I'm wondering if anyone has seen this sort of thing before, or has any ideas around work arounds?
I'm not sure if this is non-blocking call or not, if not is there an alternate file call which is non-blocking? Does compression cause additional issues? Is the fact that it's writing to an SSD have any bearing?
The system is
PS. The actual code is here in case anyone feels like a deeper look
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions