Upsource 2017.3 Help

Error: "Unable to lock JVM memory (ENOMEM)"

Upsource continuously shows "Indexing in progress" for some (all) revisions, or Apache Cassandra database gets restarted on a regular basis. Going through Upsource logs you encounter the following error:

Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out, especially with mmapped I/O enabled. Increase RLIMIT_MEMLOCK or run Cassandra as root

or:

Too many open files..

Solution

Insufficient resource limits may result in this kind of error. To mitigate this we recommend setting:

  • maximum open files to 100000
  • memory locking and address space limit to unlimited
  • number of processes to 32768

You can do it by adding the following lines to the /etc/security/limits.conf file:

* - memlock unlimited * - nofile 100000 * - nproc 32768 * - as unlimited
Last modified: 28 February 2018