[ejabberd] Ejabberd's mnesia corrupted?

Peter Viskup skupko.sk at gmail.com
Thu Mar 28 02:31:39 MSK 2013


On 03/26/2013 10:54 PM, Peter Viskup wrote:
> Hi folks,
> during the startup I see these files being created in the directory of 
> ejabberd's Mnesia DB:
>
> -rw-r----- 1 ejabberd ejabberd 139453100 Mar 26 21:59 
> fs_ejabberd at jabber_32306_1364_331543_467701.273
>
> They are being created during every start of the ejabberd.
> Does that mean the Mnesia database is corrupted?
>
> Best regards,

I will answer myself partially.
In the Mnesia user guide [1] in chapter "Mnesia System Information" 
there are documented Disaster Recovery procedures.
What I am seeing on the ejabberd's Mnesia tables is the repair attempt 
of particular table.
Files like following are shown during the ejabberd/Mnesia startup:

-rw-r----- 1 ejabberd ejabberd  45731128 Mar 27 17:49 offline_msg.DAT
-rw-r----- 1 ejabberd ejabberd  16811320 Mar 27 17:49 roster.DAT.TMP
-rw-r----- 1 ejabberd ejabberd    472350 Mar 27 17:49 last_activity.DCL
-rw-r----- 1 ejabberd ejabberd 137545010 Mar 27 17:49 
fs_ejabberd at jabber_4570_1364_402968_353783.273
-rw-r----- 1 ejabberd ejabberd 137555163 Mar 27 17:50 
fs_ejabberd at jabber_4570_1364_402968_353783.546
-rw-r----- 1 ejabberd ejabberd   8597174 Mar 27 17:50 
fs_ejabberd at jabber_4570_1364_402968_353783.563
-rw-r----- 1 ejabberd ejabberd   8596719 Mar 27 17:50 
fs_ejabberd at jabber_4570_1364_402968_353783.580
<cut here\>
-rw-r----- 1 ejabberd ejabberd   8596946 Mar 27 17:50 
fs_ejabberd at jabber_4570_1364_402968_353783.716
-rw-r----- 1 ejabberd ejabberd   8596970 Mar 27 17:50 
fs_ejabberd at jabber_4570_1364_402968_353783.733
-rw-r----- 1 ejabberd ejabberd    537364 Mar 27 17:50 
fs_ejabberd at jabber_4570_1364_402968_353783.734
-rw-r----- 1 ejabberd ejabberd    537352 Mar 27 17:50 
fs_ejabberd at jabber_4570_1364_402968_353783.735
-rw-r----- 1 ejabberd ejabberd    432734 Mar 27 17:50 
fs_ejabberd at jabber_4570_1364_402968_353783.736
drwxr-xr-x 2 ejabberd root          8192 Mar 27 17:50 .
-rw-r----- 1 ejabberd ejabberd      2816 Mar 27 17:50 roster.DAT.TMP.8
-rw-r----- 1 ejabberd ejabberd    110592 Mar 27 17:50 roster.DAT.TMP.12
-rw-r----- 1 ejabberd ejabberd  31001856 Mar 27 17:50 roster.DAT.TMP.9
-rw-r----- 1 ejabberd ejabberd   8946688 Mar 27 17:50 roster.DAT.TMP.11
-rw-r----- 1 ejabberd ejabberd  44585472 Mar 27 17:50 roster.DAT.TMP.10
-rw-r----- 1 ejabberd ejabberd   1952955 Mar 27 17:50 roster.DAT.TMP.1

Does anybody know how to test the consistency of ejabberd's Mnesia DB?

[1] http://www.erlang.org/doc/apps/mnesia/Mnesia_chap7.html

Mostly the roster and roster_3 table needs repair - probably some 
excessive load on roster table experienced during the crash of the 
ejabberd (caused by not enough memory).

Best regards,
-- 
Peter Viskup


More information about the ejabberd mailing list