# Memlock check is incorrect in v2.3.1

**URL:** <https://discuss.elastic.co/t/memlock-check-is-incorrect-in-v2-3-1/106652>\
**Category:** Elasticsearch\
**Created:** [November 7, 2017, 9:03am UTC](https://discuss.elastic.co/t/memlock-check-is-incorrect-in-v2-3-1/106652 "2017-11-07T09:03:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ndtreviv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ndtreviv/32/22494_2.png) [@ndtreviv](https://discuss.elastic.co/u/ndtreviv)\
**Post date:** [November 7, 2017, 9:03am UTC](https://discuss.elastic.co/t/memlock-check-is-incorrect-in-v2-3-1/106652/1 "2017-11-07T09:03:56Z")

</div>

I'm still getting this in the startup logs:

```auto
[2017-11-06 20:47:12,764][WARN][bootstrap] Unable to lock JVM Memory: error=12,reason=Cannot allocate memory
[2017-11-06 20:47:12,765][WARN][bootstrap] This can result in part of the JVM being swapped out.
[2017-11-06 20:47:12,765][WARN][bootstrap] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536
[2017-11-06 20:47:12,765][WARN][bootstrap] These can be adjusted by modifying /etc/security/limits.conf, for example: 
	# allow user 'elasticsearch' mlockall
	elasticsearch soft memlock unlimited
	elasticsearch hard memlock unlimited

```

despite having this:

```auto
# allow user 'elasticsearch' mlockall
elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited

```

in a file located: `/etc/security/limits.d/elasticsearch.conf`

Do I need to do something else? (eg: [Help getting mlockall to work on ubuntu 14.04](https://discuss.elastic.co/t/help-getting-mlockall-to-work-on-ubuntu-14-04/45623))

Also, we have configured `vm.swappiness`, but still get this warning. It'd be great if the startup check checked all available options to ensure that at least one of them is checked and didn't bother warning you if something was setup correctly...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 5, 2017, 9:04am UTC](https://discuss.elastic.co/t/memlock-check-is-incorrect-in-v2-3-1/106652/2 "2017-12-05T09:04:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
