[ejabberd] mnesia corruption with concurrent ejabberdctl usage

Martin Langhoff martin.langhoff at gmail.com
Tue Dec 29 20:27:47 MSK 2009


On Tue, Dec 29, 2009 at 12:51 PM, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> So I cannot use the PID-based approach. Instead, I will be
> implementing something based on the pseudocode I posted earlier. And
> if 100 isn't enough for a given setup, the script can error out with a
> sensible message ("raise your maxconcurrent").

Done. I can now run "forkbomb" style

 for N in $(seq 1 to 100); do
    ejabberdctl [whatever cmd] &
  done

with no errors anymore. If it does run out of connections it gives us
a reasonable error. And flock errors don't get mixed up with erl
errors. In general terms, it looks like The Right Fix to me.

I am cooking an RPM but you can see, critique and/or use the patches I
apply to ejabberdctl.template and the resulting script.

cheers,



m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ejabberdctl_runuser_onlywneeded.patch
Type: application/octet-stream
Size: 536 bytes
Desc: not available
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20091229/d2977db2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ejabberdctl_multiconnection.patch
Type: application/octet-stream
Size: 2053 bytes
Desc: not available
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20091229/d2977db2/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ejabberdctl.template
Type: application/octet-stream
Size: 6162 bytes
Desc: not available
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20091229/d2977db2/attachment-0002.obj>


More information about the ejabberd mailing list