How To Solve Issues Related to Log – Increase RLIMIT-MEMLOCK; soft limit:

Improve Your Elasticsearch Configuration

No Installation Required
No Security Risk
3 Free Minute Process !

No Installation

Updated: Feb-20

In-Page Navigation (click to jump) :

Opster Offer’s World-Class Elasticsearch Expertise In One Powerful Product
Try Our Free Elasticsearch Check-Up   Fix Painful Mistakes !

Troubleshooting background

To troubleshoot Elasticsearch log “Increase RLIMIT-MEMLOCK; soft limit:” it’s important to understand common problems related to Elasticsearch concepts: bootstrap. See detailed explanations below complete with common problems, examples and useful tips.


To help troubleshoot related issues we have gathered selected Q&A from the community and issues from Github , please review the following for further information :

1 Unable to lock JVM Memory: error=12, reason=Cannot allocate memory – Elasticsearch 6.2.4 5.38 K 5

2Problem Configuring The Memory  


Log Context

Log ”Increase RLIMIT_MEMLOCK; soft limit:” classname is JNANatives.java
We have extracted the following from Elasticsearch source code to get an in-depth context :

         // mlockall failed for some reason
        logger.warn("Unable to lock JVM Memory: error=" + errno + ";reason=" + errMsg);
        logger.warn("This can result in part of the JVM being swapped out.");
        if (errno == JNACLibrary.ENOMEM) {
            if (rlimitSuccess) {
                logger.warn("Increase RLIMIT_MEMLOCK; soft limit: " + rlimitToString(softLimit) + "; hard limit: " + rlimitToString(hardLimit));
                if (Constants.LINUX) {
                    // give specific instructions for the linux case to make it easy
                    String user = System.getProperty("user.name");
                    logger.warn("These can be adjusted by modifying /etc/security/limits.conf; for example: \n" +
                                "\t# allow user '" + user + "' mlockall\n" +






About Opster

Opster identifies and predicts root causes of Elasticsearch problems, provides recommendations and can automatically perform various actions to prevent issues, optimize performance and save resources.

Learn more: Glossary | Blog| Troubleshooting guides | Error Repository

Need help with any Elasticsearch issue ? Contact Opster