ejabberd - Comments for "ejabberdctl connected-users crash" https://www.ejabberd.im/node/3260 en Don't call so often https://www.ejabberd.im/node/3260#comment-53718 <div class="quote-msg"> <div class="quote-author"><em>mrok</em> wrote:</div> <p>I'm using ejabberd with BOSH in quite big load (~2500 concurrent users), one of ten invocation of ejabberdctl connected-users ends in crash.</p></div> <p>You have an ejabberd server running with 2.500 users. Then you execute "ejabberdctl connected-users". This call gets a list of all connected users, then sorts the list, then traverses the list to convert each user name to the JID, and then travserses all the list again to print in the shell.</p> <p>Obviously this call consumes some CPU, and if your machine is heavily loaded it make take a few miliseconds, or even seconds. If you perform this call too often, probably you call it before the previous call didn't yet finish, right? In such case, when you attempt to execute ejabberdctl at the same time a previous command is still being processed, it crashes with this error message: duplicate_name. The name of the ejabberdctl process already exists.</p> <p>Two solutions: don't call ejabberdctl so often because it stresses the CPU too much. Optimize ejabberdctl connected-users, but you would need to compile the file and install it.</p> Wed, 05 Nov 2008 00:18:31 +0000 mfoss comment 53718 at https://www.ejabberd.im