Hey there,
after my elastic usage is growing, I ran into the script.max_compilations_rate(
TransportError(500, 'general_script_exception', '[script] Too many dynamic
script compilations
) in my updates. I use update by query scrips ins my Python application, because I have not saved the document ids outside to use them for updates. An update looks sth like this:
I guess I have 3 options here: (correct me if am wrong)
update max_compilations_rate: I don't wanna do that for performance reasons
Reindex all documents using feed_id as document id and then use "Update API"
Change Update Script/method (?)
Is there a way to do this kind of updates(without knowing document id) with indexed scripts/without dynamic scripts?
If yes, where can I find the right documentation?
If no, how can I create a reindex pipeline which uses "feed_id" as doc id(or is this even possibile)?
if that is your script beeing used across all updates, then it is unlikely that the too many dynamic script compilations stems from this script, but from others.
Is this the only script. you are using in your updates? Or just one of many?
This script is used for updates of my Python Application using the update_by_query method of the Elasticsearch Python client. It is performed multiple 100 times per minute with different feed_id 's and different or multiple parameters used for the updates.
I forgot to mention that the script in my question is just one example of the scripts which are used for updating.
You can increase logging for the component that compiles the script to see what is actually compiled. Make sure you disable this again at some point to prevent lots of logging
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.