[ejabberd] Can't get more than 32768 online users with ejabberd (need 50k+)

Max Kalika max.kalika at gmail.com
Wed Jun 16 17:33:08 MSD 2010


Check /proc/<pid>/limits and look for open files limit. I suspect it's  
set to 32k. To fix it modify your startup script and add:

ulimit -n 131072

Or whatever is appropriate.

--mk23, now with more iPhone.

On Jun 16, 2010, at 4:36 AM, Vasily Samoylov <mail at vas.org.ua> wrote:

> Hi.
> I am running ejabberd-2.1.3 from ports on freebsd 8.1pre, amd64, 8G  
> ram, backended by native erlang mysql driver from ejabberd cvs  
> (mysql-5.1).
> My problem is that I can't get more than 32768 users online,  
> accordind to ejabberctl connected_users_number (after 25k some  
> connections are established, then dropped).
> It's still plenty of ram and cpu available, but I just don't know  
> where to go from here. Kernel is reasonably tuned, as far as I know.
>
> I want to get at least 50k users online, maybe 100k. Thanks in  
> advance for any advice!
>
> Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:8:8] [rq:8] [async- 
> threads:0] [hipe] [kernel-poll:true]
> Eshell V5.7.5  (abort with ^G)
> (ejabberd at localhost)1> os:getenv("ERL_MAX_PORTS").
> "500000"
> (ejabberd at localhost)2> os:cmd("ulimit -n").
> "200000\n"
> (ejabberd at localhost)3>
>
>
> >cat ejabberdctl.cfg | grep -v # | grep -v ^$
> POLL=true
> SMP=enable
> ERL_MAX_PORTS=1000000
> ERL_PROCESSES=3500000
> ERL_MAX_ETS_TABLES=5000
>
> >cat /boot/loader.conf
> net.inet.tcp.syncache.hashsize=1024
> net.inet.tcp.syncache.bucketlimit=100
> net.inet.tcp.tcbhashsize=4096
> kern.ipc.nsfbufs=10240
>
> >cat /etc/sysctl.conf
> kern.ipc.nmbclusters=65000
> kern.ipc.somaxconn=4096
> kern.ipc.maxsockets=204800
> kern.maxfiles=204800
> kern.maxfilesperproc=200000
> net.inet.tcp.recvspace=16384
> net.inet.tcp.sendspace=16384
> net.inet.tcp.maxtcptw=55000
> net.inet.ip.portrange.first=1024
> net.inet.ip.portrange.last=65535
> net.inet.ip.portrange.randomized=0
> net.inet.tcp.nolocaltimewait=1
> net.inet.tcp.fast_finwait2_recycle=1
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd


More information about the ejabberd mailing list