[erlang-questions] Mnesia deleting log file

Michael Schmidt Michael.K.Schmidt@REDACTED
Wed Nov 22 14:21:57 CET 2017


Hi Arun,

If you happen to reboot when Mnesia is writing out its logfile, it can become corrupt (and lose data).  We fight this issue on embedded devices a lot.

Look “Configuration Parameters” section here:
http://erlang.org/doc/man/mnesia.html#id69584

You will want to set dump_log_update_in_place to false.  This will make it write out the table to a new file, and rename it the very end.

One other option to look at is dump_log_time_threshold to change how often items are flushed to disk.  For configuration data, you can likely set this to a few seconds.

These options can be set via the sys.config file as well

Mike

From: erlang-questions-bounces@REDACTED [mailto:erlang-questions-bounces@REDACTED] On Behalf Of Arun
Sent: Tuesday, November 21, 2017 10:16 PM
To: erlang-questions@REDACTED
Subject: [erlang-questions] Mnesia deleting log file


Dear all,

I've a program written in erlang which uses Mnesia application as the database application. I've a table created by name "configuration_table" which stores

certain configurations that need to be persistent. Occasionally, whenever I restart my program the following error is thrown by mnesia and I end up losing

all the persistent configurations.

I've searched about this problem in the erlang documentation and all it tells is "Node not running". What could be the probable cause for this problem

and how do I fix it?

Mnesia('test@REDACTED<mailto:ommp82_plus@REDACTED>'): Data may be missing, Corrupt logfile deleted: "/home/utl/mnesia_database/configuration_table.DCL", {node_not_running,
'test@REDACTED<mailto:ommp82_plus@REDACTED>'}

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171122/7c37493a/attachment.htm>


More information about the erlang-questions mailing list