Bug 5097 - number of processes (501) is over allowed limit (500), but only 74 processes are actually running
number of processes (501) is over allowed limit (500), but only 74 processes ...
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: File Services
3.0.24
x64 Linux
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-20 14:27 UTC by Ralf Gross
Modified: 2007-11-27 14:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Gross 2007-11-20 14:27:12 UTC
I regularly have the problem that no new connections to our samba
server can be established (debian etch amd64, samba 3.0.24-6etch4, security =
ADS).


[2007/11/20 13:43:45, 0] smbd/server.c:allowable_number_of_smbd_processes(220)
  allowable_number_of_smbd_processes: number of processes (501) is over allowed limit (500)
[2007/11/20 13:54:00, 0] smbd/server.c:allowable_number_of_smbd_processes(220)
  allowable_number_of_smbd_processes: number of processes (501) is over allowed limit (500)
[2007/11/20 14:04:57, 0] lib/util_sock.c:get_peer_addr(1229)
  getpeername failed. Error was Der Socket ist nicht verbunden
[2007/11/20 14:42:56, 0] smbd/server.c:allowable_number_of_smbd_processes(220)
  allowable_number_of_smbd_processes: number of processes (501) is over allowed limit (500)
[2007/11/20 14:51:21, 0] lib/util_sock.c:get_peer_addr(1229)
  getpeername failed. Error was Der Socket ist nicht verbunden

I've the following in my smb.conf:

max smbd processes = 500
deadtime = 15

I rember that I once had the problem that several hundred smbd processes made
the server completely unresponsive. I then added the above config options.

Now I see the 'number of processes (501) is over allowed limit (500)' messages
every few weeks. But if I check the running smbd processes I never find more
than 70-80. This is also the number of procs that are usually running.

# smbstatus -p -b | wc -l
60

# ps -eLf | grep smbd | wc -l
58

# pgrep -lf smbd | wc -l
57

# netstat -tunp | grep smb | wc -l
55

# ps aux | grep nmbd | wc -l
1


So my questions are:

* why is smbd complaining about >500 processes if only 74 are running?
* how can I check what the resason for the message/number of proecesses is?
Comment 1 Volker Lendecke 2007-11-26 16:12:48 UTC
Between 3.0.24 and 3.0.25 we've rewritten the code that counts the running smbd processes. 3.0.24 relied on child processes to correctly clean up after themselves which certainly might fail if they die unexpectedly. In 3.0.25 the parent smbd takes care of this alone which is much more reliable. I'm marking this bug as fixed. If you see it with >=3.0.25 as well, please re-open this bug.

Thanks,

Volker
Comment 2 Ralf Gross 2007-11-27 14:23:18 UTC
Thanks for your response. I'm stuck with debian's version 3.0.24 in stable. Is there any way to monitor what number of processes samba *thinks* are running? At the moment I can't use nagios to monitor this, because the number of processes seen with ps is ok.