Setting a global limit on sessions

Set a global limit for the maximum number of sessions allowed on a server, to help prevent out-of-memory errors. The value set here supersedes a larger value set in the "Route maximum sessions" property.

About this task

You can limit the number of sessions that a particular server supports, or choose to leave the sessions unrestricted.

When a user subscribes to be notified of another user's status changes, a presence session object is created. Whenever two users start a new chat, an instance messaging session object is created. These session objects take up considerable space in memory. To avoid a scenario in which a very high level of user activity might cause an out-of-memory error to occur, set the maximum session property to a predefined limit that you know is supported. In the event of these limits being reached, the server does not create any new sessions, but does continue to serve existing sessions.

In a cluster, the maximum number of sessions is applied to each node, so the true maximum is the number of nodes multiplied by the maximum sessions value; for example, if your cluster has two nodes and your maximum sessions is set to 5000, then your cluster actually supports a maximum of 2 * 5000 = 10,000 sessions.

There are two configuration levels regarding the maximum sessions limit in Sametime® Gateway: global limits and community limits. For information about the community limits, see the topic Setting a community-level limit on sessions in Sametime Gateway.

The procedure that follows sets a global limit for the maximum number of sessions allowed at one time on a particular server. The global limit that you specify here is enforced on all communities in your IBM Sametime Gateway deployment as a whole, therefore, the sum of all the external communities sessions cannot exceed the global limit.

Expected state:
  • Single server: the Sametime Gateway Server is started.
  • Cluster: the deployment manager is started, and the node agent and the Sametime Gateway Server are started on at least one node.

Procedure

  1. In the Integrated Solutions Console, click Sametime Gateway > Gateway Properties.
  2. Select Set maximum sessions.

    Deselect the box if you do not want to limit instant messaging and presence sessions.

  3. Set the maximum sessions for instant messaging by typing an integer.

    Assuming max JVM heap was set to 1.5GB, the recommended value is 8,000 for a single server deployment.

  4. Set the maximum sessions for presence by typing an integer.
    Assuming max JVM heap was set to 1.5GB, these are the recommended values:
    • For a single server, or a cluster instance without SIP session replication enabled, the recommended value is 100,000.
    • For a cluster instance with SIP session replication enabled, the recommended value is 100,000.
  5. Click Apply.
  6. Restart the Sametime Gateway Server; if you have a cluster of Sametime Gateway Server, restart the cluster.