I am facing caching issue while using scripts.
So I am using below script in elasticsearch query.
But when it runs multiple times it gives circuit breaker exception( Too many dynamic script compilations within, max: [75/5m]) as my key keeps changing. So it caches everytime a new key is there. I tried to look for params help but I couldn't find any help where doc key is passed as param value. Can you help how can we achieve this?
Hi @dadoonet Can you please elaborate more on context which you are asking. Not aware of context here.
I am using default painless script in elastic cluster 6.4.2 if that is what you are looking for.
Here store.warehouse_1162652_price varies with every request. Like it is store.warehouse_1162652_price for this request. It can be store.warehouse_1162687_price for another request .So I am trying to use params for the script. Need to understand how can i write that.
I am also having this issue with scripted metric aggregations with stored scripts. The process taken to understand the issue is:
a script code is updated and then pushed to the _scripts/ api overwriting the current stored script file.
the scripted metric that references the stored script will about 50% of the time run an older version of the script or it will run the new script. Spamming the play button will show differences in responses about 50% of the time.
It feels like a caching issue of the old script. I can provide more details if needed.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.