Failed to memlock pages, error: 12 (Cannot allocate memory): Proper LockPagesInMainMemory Option On Linux

(Doc ID 1953033.1)

Last updated on OCTOBER 23, 2016

Applies to:

MySQL Cluster - Version 5.0 and later
Linux x86-64

Goal

 Even if LockPagesInMainMemory is set to 1 or 2 and the system has sufficient RAM, it fails to lock memory pages with errno 12. In such case, a warning like below is logged in a data node's node log (e.g. ndb_1_out.log).

This indicates that mlockall(2) system call was failed due to insufficient memory which can be locked. 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms