[erlang-questions] Mnesia is overloaded

Hakan Mattsson hakan@REDACTED
Wed Aug 8 09:43:39 CEST 2007

On Tue, 7 Aug 2007, David King wrote:

DK> I have an application that uses mnesia (through erlydb) that, at the  
DK> moment, gets very little traffic, except occasionally it has a few  
DK> tens of thousand records inserted all at once (well, two or three at  
DK> a time, but several thousand in a row). When this happens, I get the  
DK> following:
DK> =ERROR REPORT==== 7-Aug-2007::10:48:50 ===
DK> Mnesia('hostname'): ** WARNING ** Mnesia is overloaded: {dump_log,
DK> write_threshold}
DK> The data makes it into the database just fine, but I get that message  
DK> quite a few times. According to <http://www.erlang.org/pipermail/ 
DK> erlang-questions/2000-July/001477.html>, that message "is generated  
DK> when a log dump has been triggered before the previous one  
DK> completed". Is there any way that I can temporary lengthen the amount  
DK> of time between log dumps? Or is it possible to make the database- 
DK> saves synchronous, to keep from overloading mnesia?

No, there is no such function in the API. The setting
is read at the startup of Mnesia.

A small burst of overload warnings is nothing to bother
about. But as it will clutter the Erlang log, it is
probably a good idea to implement an Mnesia event
callback module in order to supress the printout. See
the event_module parameter in the Mnesia documentation
for more details:


The original idea of issuing these overload events was
to enable the Mnesia user to implement some clever
overload protection algorithm. But i don't know if
anyone has succeeded in doing that.


More information about the erlang-questions mailing list