Scripted field and "Too many dynamic script compilations within one minute,"


(Amichai Meir) #1

Hi

I'm using elastic/kibana 5.5.1
My scripted field get the "Too many dynamic script compilations within one minute" error.
Now I saw the recommendation to use indexed scripts, file based scripts or to use parameters in the script.
Is any of these options can be done in Kibana?
Another solution I saw is to change the settings of "script.max_compilations_per_minute", but I couldn't do that.
I tried:
PUT /_cluster/settings
{
"transient" : {
"script.max_compilations_per_minute" : 20
}
}
but this wasn't work: "Validation Failed: 1: no settings to update;"

Any help?


(Joe Fleming) #2

It looks like there's a change to that check that will be landing in 6.0, which doesn't really help you now, but just so you know.

As for the setting, I tried running this in Kibana's Console, and it worked for me. Are you sure you don't have something else enabled that might stop you from setting it (like Security)?

PUT /_cluster/settings
{
  "transient": {
    "script.max_compilations_per_minute": 40
  }
}

Otherwise, it looks like Kibana only supports inline scripts, so indexed and file based scripts are out. And as far as I can tell, there's no way to use parameters with inline scripts in Kibana either.


Too many dynamic script compilations
(Amichai Meir) #3

I'm writing here the root cause of the problem so it could help someone.
The problem was due to path without return in the scripted field. Means some "if" "else if" "else if" without last "else".
I could noticed that only after increasing the script.max_compilations_per_minute over to 1000, and then instead of "Too many dynamic script compilations within one minute,” I got the real error.


(system) #4

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