Unable to set mustache.max_output_size_bytes in elasticsearch.yml version 7.17.25

Hi,

We have recently upgraded to 7.17.25 and trying to set the below configuration in elasticsearch.yml as recommended in the release notes

mustache.max_output_size_bytes: 10485760

however we see that configuration is not picked up by elatsicsearch at startup and throwing the Exception as below

java.lang.IllegalArgumentException: failed to parse setting [mustache.max_output_size_bytes] with value [10485760] as a size in bytes: unit is missing or unrecognized

Try looks like the setting needs units

mustache.max_output_size_bytes: 1mb

So 2mb would be

mustache.max_output_size_bytes: 2mb

See

Thanks Stephen.

I have set the value as recommended but now i am seeing a different exception at the start up. Look like the setting itself is not recognized. Am i missing anything?

org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [mustache.max_output_size_bytes] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

1 Like

Hmmm I am seeing the same things... I will try to check internally... Its US / UK holiday... so you may not get an answer right away

I understand. Will wait for your response. I tried this configuration in both 7.17.25 and 7.17.26. Both versions are giving the same exception.

TO be clear the new default is 1mb do you need more than that... that is quite a long script...

Unfortunately, yes, we need more than 1mb until we find a way to optimize.
These are existing scripts which were running fine on 7.17.11 until we upgrade to 7.17.25 last week.

There is a bug... thee setting was not properly "registered" so it can not be set at this time...

There is going to be a PR opened when it does I will paste it here for you to track.

Here is the PR

Thanks Stephen. I know it is a bit early to ask, do you have any timeline on when this will be fixed?

No and I do not control that, and Elastic does not announce release dates ahead of time.

I would suggest to follow the PR it is already in the process of being merged....

It is tagged for

Keep an eye out for the 7.17.27 release...

Hi stephen,

This bug got fixed in the new version 7.21.27, we can be able to set the limit in node setting as mustache.max_output_size_bytes: 1024mb.

After setting it to this much size still getting the same exception as

"type": "size_limit_exceeded_exception",
            "reason": "String [{ \"_source\" : [\"id\",...] has exceeded the size limit [1073741824]

The request is quiet long but it should not exceed 1GB of size.

Can you please suggest on this?

Am i missing anything here?

@Arun_Kumar8

First there is no 7.21.27 only 7.17.27 so please check your versions.

Are you sure? How did you validate the length?

@rjernst Sorry to bug you any thoughts? this refers to this...

I would verify the length of the script. I will also separately adjust the error message to make clear what length we see.

Hi Stephen,

My bad, it is 7.17.27.

Tried to calculate the request length via postman API hit, it is coming around 2mb only.

Is there any other setting is required?

the setting should be mustache.max_output_size_bytes: 1024mb or 1024m ?

Hi @stephenb

Could you provide any suggestion on this?

Hi @rjernst any thoughts on this? ^

Both m and mb work for megabytes.

I'm not sure why you are seeing ~2mb limit if setting 1024mb. Could you please open an issue in Elasticsearch github?

Hi @rjernst,

The 2mb which i mentioned is the request size which i calculated, in elastic log it is showing 1024mb(has exceeded the size limit [1073741824]) in the exception.
my query is even we set the mustache size to 1024mb, it is still throwing the exception, i tired to increase till 2Gb, but getting same exception.