Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error messages when mlockall fails #11433

Merged
merged 6 commits into from Jun 1, 2015
Merged

Conversation

rmuir
Copy link
Contributor

@rmuir rmuir commented May 30, 2015

For example on OS X:

[2015-05-30 11:22:14,095][WARN ][bootstrap                ] Unable to lock JVM Memory: error=78,reason=Function not implemented. This can result in part of the JVM being swapped out

On Linux:

[2015-05-30 11:23:53,596][WARN ][bootstrap                ] Unable to lock JVM Memory: error=12,reason=Cannot allocate memory. This can result in part of the JVM being swapped out
[2015-05-30 11:23:53,597][WARN ][bootstrap                ] Increase RLIMIT_MEMLOCK (ulimit). soft limit:65536, hard limit:65536

@rmuir
Copy link
Contributor Author

rmuir commented May 30, 2015

I tried to improve messages more for the Linux case, to give some instructions on how to fix it:

[2015-05-30 12:22:53,792][WARN ][bootstrap                ] Unable to lock JVM Memory: error=12,reason=Cannot allocate memory. This can result in part of the JVM being swapped out.
[2015-05-30 12:22:53,792][WARN ][bootstrap                ] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536
[2015-05-30 12:22:53,793][WARN ][bootstrap                ] These can be adjusted by modifying /etc/security/limits.conf, for example: 
    # allow user 'esuser' mlockall
    esuser soft memlock unlimited
    esuser hard memlock unlimited
[2015-05-30 12:22:53,793][WARN ][bootstrap                ] If you are logged in interactively, you will have to re-login for the new limits to take effect.

@s1monw
Copy link
Contributor

s1monw commented May 30, 2015

cool stuff @rmuir this is a good improvement +1

rmuir added a commit that referenced this pull request Jun 1, 2015
Better error messages when mlockall fails
@rmuir rmuir merged commit ec8ab8a into elastic:master Jun 1, 2015
@kevinkluge kevinkluge removed the review label Jun 1, 2015
@clintongormley clintongormley added >enhancement :Core/Infra/Logging Log management and logging utilities labels Jun 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Logging Log management and logging utilities >enhancement v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants