https://www.elastic.co/guide/en/elasticsearch/guide/current/_limiting_memory_usage.html
https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html
有时候ES会爆内存不够的Exception,这时候就需要增加系统分配给ES的内存。
增加的方法 1.设置系统环境变量
ES_HEAP_SIZE 3g
ES_MIN_MEM 3g
ES_MAX_MEM 3g
或者设置.elasticsearch.bat(用nodepad打开)
找到
%elasticsearch_home%/bin/service.bat
foundJVM
if "%ES_MIN_MEM%" == "" set ES_MIN_MEM=3g
if "%ES_MAX_MEM%" == "" set ES_MAX_MEM=3g