[erlang-questions] Mnesia read timeout
Fri Dec 10 16:40:33 CET 2010
2010/12/10 Rajesh Bhat <rbhat@REDACTED>:
> Thanks. Yes it was gen_server call that timed out. I meant to ask what would cause
> mnesia:read to take that long. Yes read and update events can be requested from
> separate processes on the same record. Given that scenario, is it possible the write
> operation took long time?
Not the write operation itself. But if your transaction first perform
the write operation
(implying a write lock) and then do some side effects, such as
gen_server calls, that
particular transaction can hang arbitrary long depending on how long
the call takes.
If other transactions are trying to access the same record/table, they
will hang until
the first transaction is ended.
If you encounter lock problems again you can use mnesia:system_info(held_locks)
to investigate which processes that are holding locks.
More information about the erlang-questions