弹性搜索记忆问题 [英] Elasticsearch memory probles

查看:111
本文介绍了弹性搜索记忆问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Ubuntu中启动弹性搜索时,启动脚本会给我以下错误:

When I'm trying too start the elasticsearch in my Ubuntu the startup script gives me the following error:

Java HotSpot(TM) Client VM warning: INFO: os::commit_memory(0x74800000, 201326592, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 201326592 bytes for committing reserved memory.

我已经尝试搜索,我找不到解决方案。如果我重新启动机器,一切都会运行好一天,然后弹性搜索就会出现这个错误。

I try already to search by this and I couldn't find the solution for this. If I restart the machine everything work well for a day and then the elasticsearch goes down and appear this error.

我已经设置了属性bootstrap.mlockall:在弹性搜索.yml文件以及默认的弹性搜索文件中的属性:

I already setup the property bootstrap.mlockall: true in the elasticsearch.yml file, and also the properties in the default elasticsearch file:

ES_HEAP_SIZE=512 (I have 1GB of RAM)
MAX_LOCKED_MEMORY=unlimited

有人知道我需要做什么?

Someone know what I need to do?

谢谢

推荐答案

您已经配置了一个带有1 GB RAM的虚拟机,但弹性正在尝试从2 GB的RAM开始(默认为Elasticsearch版本5.X)

You have configured a virtual machine with 1 GB of RAM, but elastic is trying to start with 2 GB of RAM (default for Elasticsearch version 5.X)

给您的虚拟机提供更多内存,或更改Elasticsearch JVM设置 /etc/elasticsearch/jvm.options 并降低以下参数的值: -Xms512m -Xmx512m

Either give more memory to your VM, or change Elasticsearch JVM settings /etc/elasticsearch/jvm.options and lower the values of the following parameters: -Xms512m -Xmx512m

这篇关于弹性搜索记忆问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆