# Limits for processes run under SlapOS.
#
# slapos is started by cron which runs as root user and applies pam_limits.so
# to spawned processes (see /etc/pam.d/cron for details).
#
# For some limits (e.g. memlock), if they are not explicitly defined,
# pam_limits.so resets them to rather strict default. This means cron/slapos
# limits cannot be adjusted in /etc/systemd/system/cron.service.d/override.conf
#
# NOTE "*", or any other group name, does not cover root user - limits for root
# has to be explicitly defined.

root             hard    nofile          1048576

# default memlock is 64K originating from ages when machines had ~ 256M of RAM total or less.
# This days VIFIB machines have at least 16GB of RAM so 64M should not be a big expense.
# Example use-case: wendelin.core 2 tests need to be able to mlock 64M.
root             hard    memlock         65536

# For machines with many partitions, supervisord spawns a lot of processes and
# it doesn't increase its own soft limit. So we increase the soft limit for all
# processes !
root             soft    nofile          65536
