# Elasticsearch crashes

**URL:** <https://community.localwp.com/t/elasticsearch-crashes/3428>\
**Category:** Support\
**Created:** [October 27, 2017, 11:22am UTC](https://community.localwp.com/t/elasticsearch-crashes/3428 "2017-10-27T11:22:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![timjensen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/timjensen/32/5160_2.png) [@timjensen](https://community.localwp.com/u/timjensen)\
**Post date:** [October 27, 2017, 11:22am UTC](https://community.localwp.com/t/elasticsearch-crashes/3428/1 "2017-10-27T11:22:57Z")

</div>

I have installed Elasticsearch and am able to get it started with the command `service elasticsearch start`, but the service soon shuts down (within ~10sec).

I think the problem is related to memory as I see this error in the log

```auto
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

```

However, I cannot seem to increase the value for vm.max\_map\_count. When I run `sysctl -w vm.max_map_count=262144` I get the error `setting key "vm.max_map_count": Read-only file system`. I’ve also tried adding `vm.max_map_count=262144` to /etc/sysctl.conf, but that makes no difference either.

Does someone know of a way to increase the value of `vm.max_map_count` or how to prevent Elasticsearch from crashing?

---

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [October 27, 2017, 2:18pm UTC](https://community.localwp.com/t/elasticsearch-crashes/3428/2 "2017-10-27T14:18:23Z")

</div>

That’s an interesting one.

Can you try editing `/etc/sysctl.conf` with `nano` inside the container?

---

<div class="post-metadata">

**Author:** ![timjensen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/timjensen/32/5160_2.png) [@timjensen](https://community.localwp.com/u/timjensen)\
**Post date:** [October 27, 2017, 3:53pm UTC](https://community.localwp.com/t/elasticsearch-crashes/3428/3 "2017-10-27T15:53:29Z")

</div>

Yes, I’ve edited `/etc/sysctl.conf` with nano but Elasticsearch still says the virtual memory is too low. Here’s what I’ve got: ![nano-sysctl-conf](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/3/3a3267c9c75136098f2e5f3aaae885844f41863b.png)

---

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [October 27, 2017, 4:23pm UTC](https://community.localwp.com/t/elasticsearch-crashes/3428/4 "2017-10-27T16:23:00Z")

</div>

What error do you see after that change in `/etc/sysctl.conf`?

---

<div class="post-metadata">

**Author:** ![timjensen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/timjensen/32/5160_2.png) [@timjensen](https://community.localwp.com/u/timjensen)\
**Post date:** [October 27, 2017, 4:53pm UTC](https://community.localwp.com/t/elasticsearch-crashes/3428/5 "2017-10-27T16:53:31Z")

</div>

Thanks for following up, Clay. Here’s the error log:  
[elasticsearch.log](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/1/14719ea23f521da5c95447b9dc532b3742318d9a.log) (9.3 KB)

---

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [October 27, 2017, 5:03pm UTC](https://community.localwp.com/t/elasticsearch-crashes/3428/6 "2017-10-27T17:03:13Z")

</div>

Can you please try this?

1. Close Local
2. Open up VirtualBox
3. Right-click on `local-by-flywheel` and go to Close » ACPI Shutdown
4. After the VM shuts down, open up the Settings for the `local-by-flywheel` VM
5. Go to the “System” tab and increase the Base Memory from 1GB to 2GB
6. Re-open Local and try Elasticsearch again

---

<div class="post-metadata">

**Author:** ![timjensen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/timjensen/32/5160_2.png) [@timjensen](https://community.localwp.com/u/timjensen)\
**Post date:** [October 27, 2017, 5:25pm UTC](https://community.localwp.com/t/elasticsearch-crashes/3428/7 "2017-10-27T17:25:55Z")

</div>

I adjusted the base memory to 2048 MB but it didn’t seem to help.  
[elasticsearch.log](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/f/f4a261f1c7bb60dcedd0d226acac89141e1909b3.log) (10.3 KB)

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [August 25, 2020, 6:32pm UTC](https://community.localwp.com/t/elasticsearch-crashes/3428/8 "2020-08-25T18:32:53Z")

</div>


