Class HeapMemoryHealthCheck

  • All Implemented Interfaces:
    HealthCheck

    @Liveness
    @ApplicationScoped
    @BuiltInHealthCheck
    public final class HeapMemoryHealthCheck
    extends Object
    implements HealthCheck
    A health check that verifies whether the server is running out of Java heap space. If heap usage exceeds a specified threshold, then the health check will fail.

    By default, this health check has a threshold of 98.0 (98.0%). If heap usage exceeds this level, then the server is considered to be unhealthy. This default can be modified using the "helidon.health.heapMemory.thresholdPercent" property. The threshold should be set as a percent, such as 50 for 50% or 99 for 99%.

    This health check is automatically created and registered through CDI.

    This health check can be referred to in properties as heapMemory. So for example, to exclude this health check from being exposed, use helidon.health.exclude: heapMemory.