[Samba] too many open files
Stefan Schäfer
ml at fsproductions.de
Thu Apr 17 01:25:38 MDT 2014
Am 15.04.2014 11:36, schrieb David Disseldorp:
> On Tue, 15 Apr 2014 10:17:03 +0200, Stefan Schäfer wrote:
>
>> The logfile says:
>>
>> "Apr 15 02:48:37 s4ad samba[3058]: [2014/04/15 02:48:37.495691, 0]
>> ../source4/smbd/process_single.c:57(single_accept_conn
>> ection)
>> Apr 15 02:48:37 s4ad samba[3058]: [2014/04/15 02:48:37.495905, 0]
>> ../lib/util/debug.c:595(reopen_logs_internal)
>> Apr 15 02:48:37 s4ad samba[3058]: Unable to open new log file
>> '/var/log/samba/log.samba': Too many open files
>> Apr 15 02:48:37 s4ad samba[3058]: single_accept_connection: accept:
>> NT_STATUS_TOO_MANY_OPENED_FILES
>> Apr 15 02:48:38 s4ad samba[3058]: [2014/04/15 02:48:38.496541, 0]
>> ../source4/smbd/process_single.c:57(single_accept_conn
>> ection)"
>>
>> The last two message repeats many times until reboot.
>>
>> It happens just when samba tries to open a new connection to its logfile.
>>
>> Any ideas? Further information needed?
> Looks like you've hit EMFILE. I'd suggest checking the list of fd's used
> by the process with "ls -l /proc/$pid/fd". That should help you
> determine whether the error is due to an fd leak somewhere.
>
> "cat /proc/$pid/limits" will also show you the "Max open files" limits
> for the process, which you may wish to raise.
>
> Cheers, David
Hello,
I found out, that it's one of the samba (not smbd) processes which cause
the problem.
During normal behavior all samba processes have between 23 and 59 open
fd's. The one with the most open fd's has a lot of open sockets.
The limit is set to 1024:
cat /proc/3070/limits |grep files
Max open files 1024 8192 files
My customer allways rebooted the system if the problem happens. This
(very early) morning i had a look at the system before anyone could
reboot it. There was a lot of "to many open file" entries in the log and
there was one samba process who had 1025 open fd's most of them sockets.
I just restart the samba daemon and the problem was gone. After restart
I had a look to the limits an now it says:
cat /proc/16041/limits |grep files
Max open files 16384 16384 files
After rebooting the whole machine the limit is 1024 and after restarting
samba it is raised to 16384. Is this normal?
At first I thought that the problem comes more and more often, but it
seems that with a limit of 1024 it happens every night and with a limit
of 16384 it happens round about every two month, but allways over night.
Is there any chance to find out wether this is a samba bug or caused by
an external problem?
Regards
Stefan
--
FSP Computer & Netzwerke
Inhaber:
Dipl.-Ing. Stefan Schäfer
Ludwigstr. 1-3
63679 Schotten
------------------------------------
Tel.: +49(0)6044 989 0000
Fax: +49(0)6044 989 0003
------------------------------------
email: info at fsproductions.de
Internet: www.fsproductions.de
------------------------------------
!tnereffid eB
Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte
Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder
diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
More information about the samba
mailing list