OutOfMemoryExceptions from the JVM can halt InterChange Server Express. To reduce such occurrences, a "memory checker" feature in InterChange Server Express can be used to pause the connectors when a predetermined level of memory usage is reached, ensuring that no new events are delivered to the connector, but still allowing it to process pending service call requests from InterChange Server Express. This can reduce memory usage. The parameters for the memory checking feature can also control the speed of event delivery to InterChange Server Express from all connectors, providing finer granularity of flow control.
Perform the following steps to implement memory checking:
CW_MEMORY_MAX
This value determines the maximum heap memory InterChange Server Express is allowed to use. It should be the same value, in megabytes, as the JVM maximum heap size specified in the startup scripts of InterChange Server Express (-mx parameter). For example:
-DCW_MEMORY_MAX=512m
For OS/400 and i5/OS, the location of the server startup script is /QIBM/UserData/WBIServer44/ServerInstanceName/bin/start_server.sh. Because the OS/400 and i5/OS manages JVM memory usage of InterChange Server Express in virtual storage, by default the maximum heap size in this startup script has been removed. Nevertheless it is still possible for the InterChange Server to receive more events from connectors than it can adequately handle. This may cause JVM memory to grow and thus degrade performance. Since there is no -mx parameter on OS/400 and i5/OS, you must monitor the Total Memory field of the General tab of the Edit Configuration panel (see InterChange Server Component Management view below). The value you choose for CW_MEMORY_MAX should be somewhat greater than the range of the Total Memory field when the InterChange Server is running normally.