Settings for the Search service requirements

Kernel parameter

# Get kernel parameter value
$ sysctl vm.max_map_count
vm.max_map_count = 65530
 
# Update kernel parameter
$ sysctl -w vm.max_map_count=262144
vm.max_map_count = 262144

User limits

Session

# Get user limit values
$ ulimit -n -f -u
open files                      (-n) 4096
file size               (blocks, -f) unlimited
max user processes              (-u) 1024
 
# Update user limits
$ ulimit -n 65536 -f unlimited -u 4096

Process

$ prlimit -u -n -f --pid <pid>
RESOURCE DESCRIPTION                   SOFT      HARD UNITS
NPROC    max number of processes       4096      4096
NOFILE   max number of open files     65536     65536
FSIZE    max file size            unlimited unlimited blocks
  
$ cat /proc/<pid>/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             4096                 4096                 processes
Max open files            65536                65536                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       15078                15078                signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us

System

To change the user limits you can edit the /etc/security/limits.conf file or /etc/security/limits.d/*.conf, as an example:

#<domain>      <type>  <item>         <value>
collibra        soft    nproc           4096
collibra        hard    nproc           4096
collibra        soft    nofile          65536
collibra        hard    nofile          65536
collibra        soft    fsize           unlimited
collibra        hard    fsize           unlimited
Tip 

It is possible that an upgrade fails due to issues with these settings. In that case, add the same configuration lines as in the above example, but replace collibra by the user account that is executing the upgrade.

Error message excerpt:

Maximum file descriptors [4096] for Search is too low, increase to at least [65536]. ...

Daemon/services

Daemon Specification
systemd

systemd configuration file:

...
[Service]
...
LimitNOFILE=65536
LimitNPROC=4096
LimitFSIZE=unlimited
...
upstart

upstart configuration file:

...
limit nofile 65536 65536
limit nproc 4096 4096
limit fsize unlimited unlimited
exec ...
System V System V services inherit the user limits.