[Samba] Problem with MAX OPEN FILES REACHED

vk vk at tmu.com.ua
Sat Jan 27 12:09:31 GMT 2007


I am using CALDERA OPENLINUX 3.1.1 with latest patches and Samba 2.2.5 on it. 
But recently I start to receive linux error "kernel: VFS MAX FILES REACHED" 
and Samba error "Too many open files". After it I tuning linux increase open 
files descriptors in
/etc/security/limits.conf 
*               soft    nproc   4094
*               hard    nproc   16384
*               soft    nofile  12000
*               hard    nofile  16000
, /etc/rc.d/init.d/samba ulimit -n 12000 before start smbd, /etc/sysctl.conf 
fs.file-max = 12000 
And start monitoring through lsof, smbstatus every 15 min.
In a few days situation with halt limits repeat and monitiring to show (I do 
not show full logs because it's very big. Only sessions which lead to 
Errors.):
######################################################## 
START-TIME =26.01.2007 09:00 

OpenFiles FULL 
1171 

OpenFiles by SMB 
861 
######################################################## 
START-TIME =26.01.2007 09:15 

OpenFiles FULL 
12179 

OpenFiles by SMB 
11860 

smbstatus 
Samba version 2.2.5 
Service uid gid pid machine 
---------------------------------------------- 
itconstr nobody nobody 27615 constr7 (10.0.1.66) Fri Jan 26  2007 
doxbuh nobody nobody 27615 constr7 (10.0.1.66) Fri Jan 26  2007 

27615 DENY_NONE 0x2019f RDWR NONE /pub/constr0/drawing/текстовые 
документы/бланк листа.тодак.doc Fri Jan 26 0915 2007 

(At first sight everything is all right while don't look at lsof monitor log 
file)

smbd 27615 root cwd DIR 8,17 4096 3424304 /pub/constr0/drawing 
smbd 27615 root rtd DIR 8,1 1024 2 / 
smbd 27615 root txt REG 8,1 1718203 22692 /usr/sbin/smbd 
smbd 27615 root mem REG 8,1 102069 22499 /lib/ld-2.2.4.so 
smbd 27615 root mem-r REG 8,1 8192 
112879 /usr/local/samba/private/secrets.tdb 
smbd 27615 root mem-r REG 8,1 696 
69685 /usr/local/samba/var/locks/messages.tdb 
smbd 27615 root mem-r REG 8,1 8192 
69697 /usr/local/samba/var/locks/brlock.tdb 
smbd 27615 root mem-r REG 8,1 8192 
69692 /usr/local/samba/var/locks/printing.tdb 
smbd 27615 root mem-r REG 8,1 8192 
69693 /usr/local/samba/var/locks/ntdrivers.tdb 
smbd 27615 root mem-r REG 8,1 696 
69695 /usr/local/samba/var/locks/ntforms.tdb 
smbd 27615 root mem REG 8,1 14831 22540 /lib/libdl-2.2.4.so 
smbd 27615 root mem REG 8,1 92218 22542 /lib/libnsl-2.2.4.so 
smbd 27615 root mem REG 8,1 26599 22503 /lib/libcrypt-2.2.4.so 
smbd 27615 root mem REG 8,1 1459437 22500 /lib/libc-2.2.4.so 
smbd 27615 root mem-r REG 8,1 8192 
69694 /usr/local/samba/var/locks/ntprinters.tdb 
smbd 27615 root mem-r REG 8,1 8192 
69696 /usr/local/samba/var/locks/share_info.tdb 
smbd 27615 root mem-r REG 8,1 32768 
69686 /usr/local/samba/var/locks/connections.tdb 
smbd 27615 root mem REG 8,1 54338 22543 /lib/libnss_compat-2.2.4.so 
smbd 27615 root mem-r REG 8,1 49152 
69691 /usr/local/samba/var/locks/locking.tdb 
smbd 27615 root 0u CHR 1,3 12379 /dev/null 
smbd 27615 root 1u CHR 1,3 12379 /dev/null 
smbd 27615 root 2u CHR 1,3 12379 /dev/null 
smbd 27615 root 3r CHR 1,9 12805 /dev/urandom 
smbd 27615 root 4ur REG 8,1 8192 112879 /usr/local/samba/private/secrets.tdb 
smbd 27615 root 5u IPv4 7311908 TCP it1.todak:netbios-ssn->constr7.todak:1028 
(ESTABLISHED) 
smbd 27615 root 6w REG 8,1 20 69684 /usr/local/samba/var/locks/smbd.pid 
smbd 27615 root 7ur REG 8,1 696 69685 /usr/local/samba/var/locks/messages.tdb 
smbd 27615 root 8ur REG 8,1 32768 
69686 /usr/local/samba/var/locks/connections.tdb 
smbd 27615 root 9ur REG 8,1 8192 69697 /usr/local/samba/var/locks/brlock.tdb 
smbd 27615 root 10r FIFO 0,5 7165965 pipe 
smbd 27615 root 11w FIFO 0,5 7165965 pipe 
smbd 27615 root 12u IPv4 7311909 UDP localhost:33081 
smbd 27615 root 13ur REG 8,1 49152 
69691 /usr/local/samba/var/locks/locking.tdb 
smbd 27615 root 14ur REG 8,1 8192 
69692 /usr/local/samba/var/locks/printing.tdb 
smbd 27615 root 15ur REG 8,1 8192 
69693 /usr/local/samba/var/locks/ntdrivers.tdb 
smbd 27615 root 16ur REG 8,1 8192 
69694 /usr/local/samba/var/locks/ntprinters.tdb 
smbd 27615 root 17ur REG 8,1 696 69695 /usr/local/samba/var/locks/ntforms.tdb 
smbd 27615 root 18ur REG 8,1 8192 
69696 /usr/local/samba/var/locks/share_info.tdb 
smbd 27615 root 19r DIR 8,17 4096 3424304 /pub/constr0/drawing 
smbd 27615 root 20r FIFO 0,5 7311910 pipe 
smbd 27615 root 21w FIFO 0,5 7311910 pipe 
smbd 27615 root 22rw REG 8,17 360448 
8634387 /pub/constr0/drawing/xd4xc5xcbxd3xd4xcfxd7xd9xc5 
xc4xcfxcbxd5xcdxc5xcexd4xd9/xc2xccxc1xcexcb 
xccxc9xd3xd4xc1.xd4xcfxc4xc1xcb.doc 
smbd 27615 root 23r DIR 8,17 4096 
8634476 /pub/constr0/drawing/xd4xc5xcbxd3xd4xcfxd7xd9xc5 
xc4xcfxcbxd5xcdxc5xcexd4xd9 

( last message repeat about 11800 times )

================================================
Can you explain me why samba open one file so a lot of times?
And how can I admin this process, restrict or limit open files in one session?
May be you have any other method or advice.

Please HELP HELP HELP my.



More information about the samba mailing list