The amount of memory used by the Gateway daemon might increase over time and a java.lang.OutOfMemory exception might occur.
The maximum number of connection manager threads and worker threads is defined in the CICS® Transaction Gateway configuration.
The Gateway daemon stops responding and the JVM writes a java.lang.OutOfMemory exception to the stderror log file or to the Java™ dump file. The JVM also creates various dump files in the information log. There is probably no noticeable decrease in performance before the problem occurs. If you happened to be monitoring memory usage before the dump occurred, you would have seen that memory usage gradually increased over time until eventually the limit was reached.
The way that Java allocates memory depends on your JVM implementation. Most JVMs allow you to adjust the maximum amount of heap memory and adjust the amount of memory allocated to each thread.
The amount of memory that Java allocates to each thread is set by using the -Xmso and -Xss options. Do not change the Java stack and native stack sizes from their default values.
For more information on thread limits see Threading model. For more information on Java memory allocation and JVM stack sizes, see the IBM® Java Diagnostics Guides Information Center.
Also see Tuning the Gateway to avoid out-of-memory conditions.