Painless max script size limit?

It used to be that the total size of a painless stored script was 16384, from a hard-coded system limit I've seen referenced before as MAXIMUM_SOURCE_LENGTH = 16384.

I've run into the limit within the last few years and am wondering what the limit is now since we've upgraded (currently at 7.7.1). Is there a setting that we can check and/or set for this?

Also, I've seen recommendations for large stored scripts written in painless to be done instead in a plugin. Can anyone show me any documentation for writing such a plugin?

We have over a thousand watchers all running the same very large painless stored script which has a lot of functionality, so if making this into a plugin is recommended I need to investigate it.


The size of scripts is limited to 65,535 bytes. You can change the value of script.max_size_in_bytes to increase that soft limit in you ES cluster settings.
More info can be found on this link.

Is that the same setting as MAXIMUM_SOURCE_LENGTH, or for cache settings? I've seen both referenced as different things.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.