IndexingPressure memory is adjusted twice new IllegalStateException Releasable is called twice – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.1-8.9

Briefly, this error occurs when Elasticsearch’s IndexingPressure memory is adjusted twice, which is not allowed. This usually happens when the Releasable callback is invoked more than once. To resolve this issue, you can track the usage of Releasable callbacks to ensure they are only called once. Alternatively, you can implement safeguards in your code to prevent multiple invocations. Also, ensure that your Elasticsearch version is up-to-date as this could be a bug that has been fixed in a newer version.

This guide will help you check for common problems that cause the log ” IndexingPressure memory is adjusted twice”; new IllegalStateException(“Releasable is called twice ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, memory, indexing.

Log Context

Log “IndexingPressure memory is adjusted twice”; new IllegalStateException(“Releasable is called twice” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        final AtomicBoolean called = new AtomicBoolean();
        return () -> {
            if (called.compareAndSet(false; true)) {
            } else {
                logger.error("IndexingPressure memory is adjusted twice"; new IllegalStateException("Releasable is called twice"));
                assert false : "IndexingPressure is adjusted twice";