Limit the total number of user connection, connection timeout

Hi,

Is there any way to set the limitation of the user connection to the server? Since the memory of the server is limited, i don’t want to make the server start swapping and affect the performance.

Moreover, is there any way to set the connection timeout value. If the server is busy, how long will user need to wait before getting connection failure? To the Openfire, to any new connection, it will fork a new process to handle that connection?

From BillChan.

Hi BillChan,

the system property “xmpp.client.idle” allows to set the time in millesconds to disconnect an idle client. This could have no effect for clients which are using keep alive packets. The default is 30 minutes (1800000 ms). You could try to set this to a lower value, “-1” does disable this feature completely.

There is as far as I know no parameter to limit the number of client connections. I did create JM-1436 to get this feature.

LG

Hi,

Thanks. I found that xmpp.client.idle will affect the successfull connected clients, not only for the client that is attempting to connect. If i set the value to “-1”, when the user keeps connection with the server (that is status “Online”), the connection will be didicated to him until he click “Offline”, right? Then, is there any upper limit of the number of connection to the openfire ?

If i found that there is a connection holding too much resouce (eg. memory), is there any way to fingure it out and close his connection?

In Apache, we have Timeout, MaxClients, MaxRequestsPerChild and the size of child. Is there any similar setting to Openfire. It will be very userful to tune the server. Also, i cannot find the mechanim of the XMPP connection, is it similar to Apache that. Process listening to the port, once there is new request, it will fork and handle the request( or threaded in java).

Sorry for my lengthy questions, but i really want to understand more about the openfire.

Thanks.

From BillChan.

Hi BillChan,

Then, is there any upper limit of the number of connection to the openfire ?

Yes, usually the file limit of your user or of the operating system or your memory (Java Xmx value). See also http://www.igniterealtime.org/about/OpenfireScalability.pdf

If i found that there is a connection holding too much resouce (eg. memory), is there any way to fingure it out and close his connection?

No, you could try to use the admin console and kick some more or less random clients. But as they usually have a reconnect feature this will not really help.

Also, i cannot find the mechanim of the XMPP connection, is it similar to Apache that. Process listening to the port, once there is new request, it will fork and handle the request( or threaded in java).

No, Java NIO is used. This allows to use only a few threads to handle a lot of connections. Wildfire/Jive Messenger did create a new thread for every connection - this did limit the number of clients as 3000 java threads are really a lot.

As users usually wants to stay connected even when idle you should increase the server resources to handle the number of users.

LG