On Mon, Dec 28, 2009 at 7:18 PM, Badlop <[email protected]> wrote:
> I don't know if your ejabberdctl shell script has the problem
> described in this thread/message:
> http://lists.jabber.ru/pipermail/ejabberd/2009-September/005351.html
That sure looks like the smoking gun. To check I am understanding this right
- It is not safe to run many ejabberdctl instances because they
always use the same "connection name"
- If we give a truly random connection name, no overlaps happen, but
erl will leak handles/processes/whatever
- So a small pool of names with some locking may work? Modern distros
carry flock, so we could say (pseudo-shell):
MAXCONNECTIONS=100
CONNLOCKDIR=/var/lock/ejabberd/ejabberdctl
for CONNID in 1..$MAXCONNECTIONS; do
if flock -n "$CONNLOCKDIR/ctl-ejabberd-$con...@localhost" \
erl -sname "ctl-ejabberd-$con...@localhost" ... ; then
break
cheers,
m
--
[email protected]
[email protected] -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff
_______________________________________________
Server-devel mailing list
[email protected]
http://lists.laptop.org/listinfo/server-devel