We have a system which needs to send notifications to end users. To accomplish this we have created desktop clients which are installed at users end, and connect to a Openfire Server. Our Application Server manages a pool of admin users (using Smack) connected to this server. Whenever it needs to send a notification to a given client, our app server sends it via the admin account (using Smack). So basically, we dont need any groups, rosters, chats as such. Our 1 and only requirement is sending a message (notification) to a particular user via our App Server.
For our Openfire Server :
openfire version 4.2.3
6 cores, 32 GB RAM. Min Heap : 4GB, max Head 12 GB
We have close to 70K users, and all of them login using the desktop client(though there is no other activity they do). Over the past couple of days we are noticing that our server will stop responding (cant open openfire login page), and we are not able to connect. We observe multiple instances of the following error:
START OF ERROR
2021.03.22 13:35:45 WARN [socket_c2s-thread-12]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x00021363: nio socket, server, null => 0.0.0.0/0.0.0.0:5222)
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:273) …
Once we restart openfire, things get back to normal in some time. This is causinga huge issue as this is recurring. I read a lot of literature around openfire (but sadly, all old posts), a lot of them that point to maximum 5K concurrent connections. I want to understand :
- What can I do to resolve this issue?
- Can Openfire scale to a production grade system supporting Million plus users (Given my basic requirement)
- If yes, how can I tune it for better performance.
APologies if the question is missing some trivial details. I am happy to provide settings/configs detail as required.