The main configuration is carried out, adjusted as follows:
1, set the ES_HEAP_SIZE environment variables to ensure that the JVM uses the maximum and minimum amount of memory the same. If the minimum and maximum memory is set, this means that when the JVM needs additional memory (up to the maximum memory size), it blocks the Java process to allocate memory to it. Using the old version of Java, you can explain why nodes in the cluster pause, have high loads, and continue to allocate memory. The Elasticsearch team recommends that you set 50% system memory for ES 2. Shorten the Recover_after_time timeout configuration so that the recovery can take place immediately, rather than waiting for a while.
3. Configuration minimum_master_nodes, to avoid the long pause of multiple nodes, some node subset of the joint attempt to organize the cluster, resulting in the entire cluster instability.
4. When the ES was initially restored, some nodes ran out of disk space. This does not know how it happened because the entire cluster uses only 67% of the total space, but it is believed to have been caused by the previous high load and the old Java version. Elasticsearch's team is also following up on this issue.
5, the problem of Marvel Plug-ins, upgrade Plug-ins or deactivate plug-ins.
6, the log problem.
Index.search.slowlog.level:TRACE
index.search.slowlog.threshold.query.warn:10s
index.search.slowlog.threshold.query.info:5s
index.search.slowlog.threshold.query.debug:2s
index.search.slowlog.threshold.query.trace:500ms
index.search.slowlog.threshold.fetch.warn:1s
index.search.slowlog.threshold.fetch.info:800ms
index.search.slowlog.threshold.fetch.debug:500ms
index.search.slowlog.threshold.fetch.trace:200ms
index.indexing.slowlog.threshold.index.warn:10s
index.indexing.slowlog.threshold.index.info:5s
index.indexing.slowlog.threshold.index.debug:2s
index.indexing.slowlog.threshold.index.trace:500ms
In Elasticsearch.yml, trace can be changed to info.