Hi,
I encountered 'Too many open files' after indexing a little more than 1 billion docs.
I use ES 1.19.3, 6 nodes in the cluster, 67 indices, 32 shards / index, 1 replica / index.
My /etc/security/limits.conf allows 100,000 file descriptors per proc.
Some of elasticsearch processes indeed exceeded this limit. (100040)
I use merge policy as default (tiered). According to http://www.elasticsearch.org/guide/reference/index-modules/merge.html, index.merge.policy.segments_per_tier is 10.
I thought the number of Lucene index segments per elasticsearch index would never exceed this number.
So I estimated the number of open files would not exceed
(67 indices * 32 shards * 2 copies * 10 Lucene index segments / 6 nodes) + (some other ~ 10,000) ~ 20,000
I did 'lsof' and found there are more than 10 Lucene index segments in many of my indices.
Ex) sudo /usr/sbin/lsof | grep <elasticsearch proc #> | grep 'nodes/0/indices//<shard #>/.*.fdt' | wc -l, I got 26
I checked curl -XGET localhost:9200/_nodes/stats?pretty=true, and found "merges":{"current":0
I think this means no merge was performed, right?
So, here's my question:
How can I configure elasticsearch to automatically perform merge during indexing?
Thank you for your help.