Univention Bugzilla – Bug 34514
Samba Daemon is started with nofile 1024 after Boot
Last modified: 2014-10-22 16:07:32 CEST
Snipped output: root@ucs3-dc4:~# ulimit -n 32768 root@ucs3-dc4:~# ps aux | grep samba root 1319 0.0 3.2 946788 33448 ? S 15:00 0:00 /usr/sbin/samba -D root 2072 0.0 0.0 9668 840 pts/0 S+ 15:03 0:00 grep samba root@ucs3-dc4:~# cat /proc/1319/limits Limit Soft Limit Hard Limit Units Max open files 1024 4096 files The problem is that limits configured via ucr or in limits.conf are getting evaluated after the initial start of the samba daemon in boot phase. So after a reboot the samba daemon runs with the default values (1024|4096). In most environments this is no problem, but at least one customer reported that the default wasn't enough: Workaround: ulimit -n value in init script itself. This should be considered as an own ucr variable (for slapd such things are made hard coded in /etc/rc*.d/S14slapd).
*** Bug 36165 has been marked as a duplicate of this bug. ***
The init script now uses ulimit -n to set the value via UCR samba/max_open_files also for the main "samba" processes. Advisory: 2014-10-13-samba.yaml
FAIL - UCS 4.0 ?? OK - YAML OK - works with errata3.2-3 -> reboot -> ssh 10.200... root@master:-> for i in $(pidof samba smbd nmbd); do cat /proc/$i/limits | \ grep "Max open file" ; done Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32808 32808 files Max open files 32828 32828 files Max open files 32828 32828 files Max open files 32808 32808 files Max open files 32808 32808 files
> FAIL - UCS 4.0 ?? Should be there, see 4.0-0-0-ucs/2:4.2.0~rc1-1.
(In reply to Arvid Requate from comment #4) > > FAIL - UCS 4.0 ?? > > Should be there, see 4.0-0-0-ucs/2:4.2.0~rc1-1. OK,
Just in case someone is wondering about the peculiar default value for samba/max_open_files which is applied here: 32808 = 2 x 16404 (see bug 24165). 16404 used to be some default in Samba (don't ask). Recently their loadparm default was adjusted to 16384 (= 32768 / 2). Sounds like a compelling reason to adjust our default as well. At some point.
http://errata.univention.de/ucs/3.2/221.html
http://errata.univention.de/ucs/3.2/224.html