Exception while invoke isThreadAllocatedMemoryEnabled – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.16-8.9

Briefly, this error occurs when Elasticsearch tries to check if the JVM option -XX:ThreadAllocatedMemory is enabled, but fails due to lack of necessary permissions or incorrect JVM configuration. To resolve this issue, you can either grant the necessary permissions to Elasticsearch or disable the usage of this JVM option by setting the Elasticsearch configuration option “bootstrap.system_call_filter” to false. Alternatively, you can ensure that the JVM is correctly configured to support this option.

This guide will help you check for common problems that cause the log ” exception while invoke isThreadAllocatedMemoryEnabled ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: monitor, memory, thread.

Log Context

Log “exception while invoke isThreadAllocatedMemoryEnabled” classname is SunThreadInfo.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :


        try {
            return (boolean) isThreadAllocatedMemoryEnabled.invoke(threadMXBean);
        } catch (Exception e) {
            logger.warn("exception while invoke isThreadAllocatedMemoryEnabled"; e);
            return false;

    public long getThreadAllocatedBytes(long id) {


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?