elkninja / elastic-stack-docker-part-one

Getting up and running with Elastic Stack on Docker-Compose
Apache License 2.0
175 stars 117 forks source link

Error: elastic exited with code 137 #5

Closed bluepuma77 closed 7 months ago

bluepuma77 commented 1 year ago

Tested with the predefined 8.7.1 and updated to 8.8.2 with the same result:

elastic-filebeat01-1    | {"log.level":"error","@timestamp":"2023-07-07T11:27:54.208Z","log.logger":"elasticsearch","log.origin":{"file.name":"elasticsearch/client.go","file.line":258},"message":"failed to perform any bulk index operations: Post \"https://es01:9200/_bulk\": EOF","service.name":"filebeat","ecs.version":"1.6.0"}
elastic-es01-1          |
elastic-es01-1          | ERROR: Elasticsearch exited unexpectedly
elastic-es01-1 exited with code 137

Running on Debian GNU/Linux 10 (buster) server with 64GB RAM, 50GB free.

Note, this did not help:

sysctl -w vm.max_map_count=262144
elkninja commented 1 year ago

You may need to up the memory config in the .env file. Currently, its at 1GB ("ES_MEM_LIMIT=1073741824") which may not be sufficient for you.

elkninja commented 1 year ago

You also may want to double-check how much memory you have configured for your docker desktop instance to use as well. increasing the memory of ES without making sure the memory is configured appropriately for docker may also cause an issue.

bluepuma77 commented 1 year ago

Running on pure server environment. Now it works, increased ES_MEM_LIMIT=4073741824 in .env.

If the minimum memory requirement for ES has changed, maybe update the repository and the blog post.

bluepuma77 commented 1 year ago

According to documentation Elastic Enterprise needs 6-8GB of RAM (doc1, doc2).

I could not find any requirements for open-source elasticsearch (doc).

elkninja commented 1 year ago

According to documentation Elastic Enterprise needs 6-8GB of RAM (doc1, doc2).

"Elastic Enterprise" here is referencing the Elastic Enterprise Search server, which is separate from Elasticsearch and has separate memory requirements.

You also referenced ECE (Elastic Cloud Enterprise) which is a separate product that can be run on-prem with the same functionality as our Cloud offering.

I could not find any requirements for open-source elasticsearch (doc).

The minimum requirements are going to depend on your usage. In this docker config, having 1GB allocated to the instance is completely fine for light ingestion/search.

When you start to ingest more data and search more heavily, then yes, you will need to increase the memory footprint for Elasticsearch.