I am using an inline script with logstash.
However i am getting "too many dynamic script compilations" error.
I understand that this should not happen with an inline script, but it seems to be happening even if i simplify my script as shown.
My logstash config:
output {
elasticsearch {
hosts => [ "${ES_CLUSTER}" ]
#hosts => [ "127.0.0.1" ]
index => "products"
#user => "${ES_USERNAME}"
#password => "${ES_PASSWORD}"
action => "update"
doc_as_upsert=> "true"
#there must be a script called "tagger" on elasticsearch
script => "tagger"
#for indexed scripts must be left blank, lang is specified in the index, not here
script_lang => ""
script_type => "indexed"
document_id => "%{sku}"
}
}
And my script:
POST _scripts/tagger
{
"script": {
"lang": "painless",
"source": "ctx._source.my_field = params.event.get('my_field');"
}
}
I am running on docker (docker config below, just in case)
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.0
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata1:/usr/share/docker/data-es
ports:
- 9200:9200
Thanks in advance for any help.