ejabberd - Comments for "is starting with status: started, takes too much time to boot" https://www.ejabberd.im/node/4491 en If problem still happens, some ideas to try https://www.ejabberd.im/node/4491#comment-57011 <div class="quote-msg"> <div class="quote-author"><em>NecmiKara</em> wrote:</div> <p>As file sizes, I have:</p> <div class="codeblock"><code>-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 253488 2011-01-18 15:42 last_activity.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd 2650283 2010-12-05 01:19 passwd.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd 7743400 2011-01-19 07:06 vcard.DAT<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd 3901699 2010-12-05 01:19 vcard_search.DCD</code></div> <p>Some of them seem too big indeed. </p></div> <p>Compare to the server that I mendioned before:<br /> -rw-r--r-- 1 ejabberd ejabberd 957130 Jan 28 10:27 last_activity.DCD<br /> -rw-r--r-- 1 ejabberd ejabberd 520589 Dec 27 20:08 passwd.DCD<br /> -rw-r--r-- 1 ejabberd ejabberd 58306790 Jan 28 12:25 vcard.DAT<br /> -rw-r--r-- 1 ejabberd ejabberd 791815 Jan 27 00:42 vcard_search.DCD</p> <p>Your only file that is larger is passwd, and not that much.<br /> The vcard table is big in my server, but it is configured to be disk-only, so I imagine it doesn't produce delay when starting Mnesia. </p> <div class="quote-msg"> <div class="quote-author"><em>NecmiKara</em> wrote:</div> <p>BTW, how can I avoid these root-owned files? (I guess they appear because I execute ejabberdctl as root) </p></div> <p>I configure ejabberd with:</p> <pre> ./configure --enable-user=somesystemuser make sudo make install sudo ejabberdctl start </pre><p>This way, the actual beam program is run by somesystemuser, not by root.</p> <div class="quote-msg"> <div class="quote-author"><em>NecmiKara</em> wrote:</div> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>my server takes around one minute to load Mnesia.</p></div> <p>I am a bit disappointed by erlang then. </p></div> <p>What do you prefer for a program that you start only once every few months and keeps running for months?<br /> A) To start fast the day you start it.<br /> B) To run fast during all the months it's running</p> <p>Remember: you can reconfigure most of ejabberd usign WebAdmin, add new modules, and even reload patched modules (as long as the changes are not substantial). No need to wait 5 minutes every morning to restart ejabberd.</p> <div class="quote-msg"> <div class="quote-author"><em>NecmiKara</em> wrote:</div> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>To reduce the database size, you can delete accounts unused for more than 365 days (for example) using mod_admin_extra </p></div> <p>I can't do this, I synchronize ejabberd accounts with my website's user accounts (by xmlrpc) . Should I consider external auth or clustering? </p></div> <p>Ok, then better keep the auth as now. You have many registered accounts (see 'passwd'), but few of them really login, so your Mnesia database can be considered small.</p> <p>You could try this (remember to first make a copy/backup of the Mnesia spool dir):<br /> Go to ejabberd WebAdmin -&gt; nodes -&gt; Your node -&gt; Database, and change the 'passwd' table to 'Copy in disc only', like the 'vcard' table. Then press Send. Then stop ejabberd, start it and see if the start time reduces.</p> <div class="quote-msg"> <div class="quote-author"><em>NecmiKara</em> wrote:</div> <p>And what about the log files? Now I get them but I didn't get them at all when the server took long time to start even once it was started. </p></div> <p>No idea.</p> Fri, 28 Jan 2011 12:18:31 +0000 mfoss comment 57011 at https://www.ejabberd.im Abnormal https://www.ejabberd.im/node/4491#comment-56996 <p>As file sizes, I have:</p> <div class="codeblock"><code>drwxr-xr-x&nbsp; 2 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096 2011-01-19 07:29 .<br />drwx--x--x 33 flo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096 2011-01-19 08:22 ..<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 556 2011-01-09 11:44 acl.DCD<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1154 2011-01-09 12:06 acl.DCL<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 2010-10-15 01:20 caps_features.DCD<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1183 2011-01-09 11:44 config.DCD<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1925 2011-01-09 12:06 config.DCL<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 160 2011-01-19 07:24 DECISION_TAB.LOG<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 2010-10-15 01:20 irc_custom.DCD<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 253488 2011-01-18 15:42 last_activity.DCD<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 57004 2011-01-19 07:24 last_activity.DCL<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 668 2011-01-19 07:26 LATEST.LOG<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2038 2011-01-09 11:44 local_config.DCD<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 27439 2011-01-09 12:06 local_config.DCL<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 2010-10-15 01:20 motd.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 2010-10-15 01:20 motd_users.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 2010-10-15 01:20 muc_registered.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 2010-10-15 01:20 muc_room.DCD<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5432 2011-01-19 06:55 offline_msg.DAT<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd 2650283 2010-12-05 01:19 passwd.DCD<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 139914 2011-01-19 07:00 passwd.DCL<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 94 2010-12-05 01:19 privacy.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp; 5752 2010-10-15 01:22 private_storage.DAT<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp; 130 2010-10-16 07:01 pubsub_index.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp; 5752 2010-10-15 01:22 pubsub_item.DAT<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp; 1239 2010-10-16 07:01 pubsub_node.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp; 220 2010-10-16 07:01 pubsub_state.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 2010-10-15 01:20 pubsub_subscription.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp; 88236 2010-10-19 19:31 roster.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp; 6968 2011-01-17 19:00 roster.DCL<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 2010-10-15 01:20 roster_version.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp; 27084 2010-10-16 07:08 schema.DAT<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 2010-10-15 01:20 sr_group.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 2010-10-15 01:20 sr_user.DCD<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd 7743400 2011-01-19 07:06 vcard.DAT<br />-rwxr-x---&nbsp; 1 ejabberd ejabberd 3901699 2010-12-05 01:19 vcard_search.DCD<br />-rw-r--r--&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 194262 2011-01-19 07:00 vcard_search.DCL</code></div> <p>Some of them seem too big indeed. BTW, how can I avoid these root-owned files? (I guess they appear because I execute ejabberdctl as root)</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>my server takes around one minute to load Mnesia.</p></div> <p>I am a bit disappointed by erlang then.</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>To reduce the database size, you can delete accounts unused for more than 365 days (for example) using mod_admin_extra </p></div> <p>I can't do this, I synchronize ejabberd accounts with my website's user accounts (by xmlrpc) . Should I consider external auth or clustering?</p> <p>And what about the log files? Now I get them but I didn't get them at all when the server took long time to start even once it was started. </p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>Once the server is fully started, with minimal load, MUC rooms shouldn't lag. Unless you have millions of rooms, or hundreds of occupants in the room.</p></div> <p>Indeed, I found the bug. The lag was not due to a ejabberd behaviour and is not related to this issue.</p> Fri, 21 Jan 2011 22:51:58 +0000 NecmiKara comment 56996 at https://www.ejabberd.im Check tables sizes. https://www.ejabberd.im/node/4491#comment-56987 <div class="quote-msg"> <div class="quote-author"><em>NecmiKara</em> wrote:</div> <p>Yes it worked nice, it started very fast.<br /> What can I do to make it work with a lot of registered users? My old mnesia contained around 30000 users.</p></div> <p>With 9000 registered accounts, 5000 vcards, 130000 roster items and 6000 offline messages, my server takes around one minute to load Mnesia.</p> <p>Check (using Webadmin, or looking at mnesia spool files) if you have some Mnesia table with an abnormal size.</p> <p>To reduce the database size, you can delete accounts unused for more than 365 days (for example) using mod_admin_extra .</p> <div class="quote-msg"> <div class="quote-author"><em>NecmiKara</em> wrote:</div> <p>(I also noticed some important and non-deterministic lags in MUC rooms, could it be the same reason?)</p></div> <p>Once the server is fully started, with minimal load, MUC rooms shouldn't lag. Unless you have millions of rooms, or hundreds of occupants in the room.</p> Wed, 19 Jan 2011 15:57:00 +0000 mfoss comment 56987 at https://www.ejabberd.im It runs very fast https://www.ejabberd.im/node/4491#comment-56985 <p>Yes it worked nice, it started very fast.<br /> What can I do to make it work with a lot of registered users? My old mnesia contained around 30000 users.</p> <p>(I also noticed some important and non-deterministic lags in MUC rooms, could it be the same reason?)</p> Wed, 19 Jan 2011 06:45:49 +0000 NecmiKara comment 56985 at https://www.ejabberd.im Do you have a Mnesia https://www.ejabberd.im/node/4491#comment-56958 <p>Do you have a Mnesia (internal) database with many registered users?</p> <p>Try this:<br /> 1. Stop ejabberd, kill beam, beam.smp, epmd<br /> 2. Delete log files (if any)<br /> 3. Move the Mnesia database spool files away, so ejabberd will recreate the database empty<br /> 4. Start ejabberd<br /> 5. Does it start correctly, and fast? Or it still takes long to start (or never starts)?</p> Tue, 11 Jan 2011 19:55:09 +0000 mfoss comment 56958 at https://www.ejabberd.im