ejabberdctl connected-users crash

I'm using ejabberd with BOSH in quite big load (~2500 concurrent users), one of ten invocation of ejabberdctl connected-users ends in crash.

{error_logger,{{2008,10,30},{17,33,35}},"Protocol: ~p: register error: ~p~n",["inet_tcp", {{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{net_kernel,start_protos,4},{net_kernel,start_protos,3},...

Crash dump was written to: /opt/ejabberd-2.0.2_2/logs/erl_crash_20081030-173335.dump
Kernel pid terminated (application_controller)
({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

Commands to start an ejabberd node:
start Start an ejabberd node in server mode
debug Attach an interactive Erlang shell to a running ejabberd node
live Start an ejabberd node in live (interactive) mode

Don't call so often

mrok wrote:

I'm using ejabberd with BOSH in quite big load (~2500 concurrent users), one of ten invocation of ejabberdctl connected-users ends in crash.

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.

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.

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.

Syndicate content