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

access*=mlock causes "Cannot allocate memory" #662

Closed
sanikolaev opened this issue Nov 19, 2021 · 1 comment
Closed

access*=mlock causes "Cannot allocate memory" #662

sanikolaev opened this issue Nov 19, 2021 · 1 comment

Comments

@sanikolaev
Copy link
Collaborator

sanikolaev commented Nov 19, 2021

If you have an index that does mlock, e.g.

access_plain_attrs=mlock    
access_doclists=mlock    
access_hitlists=mlock    

it takes you an effort to avoid Cannot allocate memory for attributes:

[root@d472fd5d8363 ~]# tail /var/log/manticore/searchd.log    
[Fri Nov 19 04:55:36.544 2021] [456] accepting connections    
[Fri Nov 19 04:55:36.544 2021] [461] prereading 1 indexes    
[Fri Nov 19 04:55:36.546 2021] [461] WARNING: index '/var/lib/manticore/user/user.0': mlock() failed: Cannot allocate memory for attributes    
[Fri Nov 19 04:55:36.602 2021] [461] WARNING: index '/var/lib/manticore/user/user.0': mlock() failed: Cannot allocate memory for dictionary    
[Fri Nov 19 04:55:36.602 2021] [461] WARNING: index '/var/lib/manticore/user/user.0': mlock() failed: Cannot allocate memory for docid-lookup    
[Fri Nov 19 04:55:36.602 2021] [461] WARNING: index '/var/lib/manticore/user/user.0': mlock() failed: Cannot allocate memory for kill-list    
[Fri Nov 19 04:55:36.602 2021] [461] WARNING: index '/var/lib/manticore/user/user.1': mlock() failed: Cannot allocate memory for attributes    
[Fri Nov 19 04:55:36.610 2021] [461] WARNING: index '/var/lib/manticore/user/user.1': mlock() failed: Cannot allocate memory for dictionary    
[Fri Nov 19 04:55:36.610 2021] [461] WARNING: index '/var/lib/manticore/user/user.1': mlock() failed: Cannot allocate memory for docid-lookup    
[Fri Nov 19 04:55:36.611 2021] [461] prereaded 1 indexes in 0.067 sec    

You have to either not use Manticore's systemd file or modify it. To avoid it let's add LimitMEMLOCK=infinity to the default systemd config.

@githubmanticore
Copy link
Contributor

➤ Sergey Nikolaev commented:

fixed by 88740da

@airolg airolg closed this as completed Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants