powered by Jive Software

Openfire/smack connection issue


Hi Team,

We are running on openfire version 4.2.3 and smack version 4.3.0.

We have more then 1 million user now and upgraded the openfire server but it was night mare for us.

Recently we are using a single server as there are only 15k live concurrent user and server is much capable to handle that much amount of load.

but recently we are facing a strange problems in android like connection drops. we can see at random time period connection is dropping for thousands of users which is very unacceptable for us.

I can see the connection status is showing me authenticated but server tell user is offline how that is possible ?

On server end i can see error log below

2019.03.25 17:28:00 WARN [socket_c2s-thread-4]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x00096416: nio socket, server, null => 
java.io.IOException: Connection timed out 
at sun.nio.ch.FileDispatcherImpl.read0(Native Method) 
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) 
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) 
at sun.nio.ch.IOUtil.read(IOUtil.java:197) 
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) 
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:273) 
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:44) 
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:690) 
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664) 
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653) 
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67) 
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124) 
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
at java.lang.Thread.run(Thread.java:748)

Please help us to get out of the weird situation.

Note- Ios version works very smoothly.

Hiren Vavadiya


It sounds like a bug to me; the following JIRAs could be the root cause;


have been fixed in more recent versions of Openfire, and could well have resolved the problem. Disabling stream management (see OF-1497) /might/ help in the short term.



thanks let me try to disable stream managment at server end so need not to rollout for all client does it make sense ?


Yes, disabling it on the server should make SM not work on the clients, even if they still have it enabled.


Ok thanks i did it but still i am getting the same error any more clue @gdt