Cannot connect more than 4k users in Openfire installed on Amazon EC2

I’m running an stress test on my openfire server and I cannot connect more than 4k users. When my computer connects 4k users, just to be sure that the problem is in the EC2, I run same test with different user offset on another computer, and still no improvement.

This is my ulimit -a.

ubuntu@amazon.ip:~$ ulimit -a

core file size (blocks, -c) 0

data seg size (kbytes, -d) unlimited

scheduling priority (-e) 0

file size (blocks, -f) unlimited

pending signals (-i) 31534

max locked memory (kbytes, -l) 64

max memory size (kbytes, -m) unlimited

open files (-n) 65535

pipe size (512 bytes, -p) 8

POSIX message queues (bytes, -q) 819200

real-time priority (-r) 0

stack size (kbytes, -s) 8192

cpu time (seconds, -t) unlimited

max user processes (-u) 31534

virtual memory (kbytes, -v) unlimited

file locks (-x) unlimited

This is the end of my /etc/security/limits.conf

End of file

  • soft nofile 65535

  • hard nofile 65535

What do you suggest?

Openfire directory logs / error.log What is the error message?

Is EC2 or press performance bottleneck?

Error log returns me:

2015.01.20 10:09:13 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [7b07dee0, 107f949d, 33bad16c]$

2015.01.20 10:09:13 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/7b07dee0

2015.01.20 10:09:13 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/33bad16c

2015.01.20 10:09:13 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [39ee8554] for key localhost/1$

2015.01.20 10:09:13 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [64cfb077, aecaa626] for key l$

2015.01.20 10:09:13 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [64cfb077] for key localhost/a$

2015.01.20 10:09:15 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/ae02b4c4

2015.01.20 10:09:18 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/e9009a3c

2015.01.20 10:09:20 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/c17317c4

2015.01.20 10:09:21 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/985a1c22

2015.01.20 10:09:21 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/f8b7af7f

2015.01.20 10:09:21 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/28ec9c55

2015.01.20 10:09:22 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/8fd77524

2015.01.20 10:09:22 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/12036875

2015.01.20 10:09:23 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/c86c5516

2015.01.20 10:09:23 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [c6ff9ba4] for key localhost/c$

2015.01.20 10:09:23 org.jivesoftware.openfire.handler.IQAuthHandler - Error during authentication. Session not found in [] for key localhost/c6ff9ba4

All users which I’m using actually exists and are valid ones.