# Max Msg Memory

Specifies the maximum memory the server can use for messages.

This property lets you limit the memory that the server uses for messages, so server memory usage cannot grow beyond the system’s memory capacity.

When Message Swapping is enabled, and messages overflow this limit, the server begins to swap messages from process memory to disk. Swapping allows the server to free process memory for incoming messages, and to process message volume in excess of this limit.

When the server swaps a message to disk, a small record of the swapped message remains in memory. If all messages are swapped out to disk, and their remains still exceed this memory limit, then the server has no room for new incoming messages. The server stops accepting new messages, and send calls in message producers result in an error. (This situation probably indicates either a very low value for this property, or a very high message volume.)

Specify units as KB, MB or GB. The minimum value is 8 MB. The default value of 0 (zero) indicates no limit.

## Classic Configuration

The memory limit is set using the max_msg_memory property in the tibemsd.conf file:

    max_msg_memory = size[KB|MB|GB]

For example:

`max_msg_memory = 512MB`

## Administration Tool

Set Max Message Memory

      set server max_msg_memory=value

  Lowering this value will not immediately free memory occupied by messages.

Copyright © Cloud Software Group, Inc. All rights reserved.