Samba warning solution “rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)”

Once I noticed a message in /var/log/samba/log on one of the servers with samba:

../source3/param/loadparm.c:320(max_open_files)
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)

The warning is displayed due to the fact that Linux has a default limit of 1024 simultaneously open files, and on Windows it is 16384.

Therefore, we will increase the limit in Linux to 16384:

sudo ulimit -n 16384

Check:

ulimit -Hn -Sn

To prevent changes from being reset after a system reboot, open the file in a text editor:

sudo nano /etc/security/limits.conf

And add at the end:

* - nofile 16384
root - nofile 16384

Done.

See also my article:
How to change “open files” in Linux

Join the Conversation

1 Comment

Leave a Reply

  1. sudo: ulimit: command not found
    and even:
    sudo: unlimit: command not found