uCosminexus Application Server, Maintenance and Migration Guide

[Contents][Glossary][Index][Back][Next]

9.14 Functionality to set the upper limit of the number of threads

The C heap memory usage increases with the increase in the number of threads used in an application. If an increase in the memory usage results in insufficient C heap, problems such as forced termination of JavaVM or abnormal end of J2EE server might occur, which might result into complete suspension of the system.

To prevent the occurrence of such problems, you can set an upper limit to the available number of threads. You can prevent C heap insufficiency by figuring out in advance the upper limit of the number of threads, and based on this you can determine the memory size allocated to C heap. Note that an exception is thrown, if the number of threads generated exceeds the set upper value. You can prevent stopping of the system by catching this exception in the application and taking appropriate measures.

Specify the upper limit of the number of threads by using the -XX:HitachiThreadLimit option. For details on the -XX:HitachiThreadLimit option, see -XX:HitachiThreadLimit (option for specifying upper limit of the number of threads) in the uCosminexus Application Server Definition Reference Guide.