Elasticsearch 6.3 as service: Unable to lock JVM Memory

Hello everyone!

In my pipeline I’m using official elasticsearch 6.3.* image (by elastic itself) configured as a service according to the docs. During instantiation of it, it errors out with message:
Unable to lock JVM Memory: error=12, reason=Cannot allocate memory This can result in part of the JVM being swapped out. Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536
In the official docs it recommends setting:
ulimits: memlock: soft: -1 hard: -1 in docker-compose.yml file https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docker.html.

However this does not get applied when I set it in .drone.yml file at the service definition. How to overcome this…?
Is there any other suggested way to run official elasticsearch images as a service in the pipeline…?

After trying out different configurations it seems to work without having to set the memory_lock=true and the ulimits. Thankfully I’m running some simple test cases which don’t seem to add a lot of load to the elasticsearch service for it to need higher limits. So it works now :slight_smile:

I haven’t finalised my pipeline yet however, I hope the next series of tests wont make these configurations mandatory. :slight_smile: Let me know if you plan on adding support for it however!

Can you provide your drone.yml as example - without this - it is very hard to judge how you tried :wink: