Run away named "accept: Too many open files" Ultrix 4.1A

Michael Gengenbach gengenba at forwiss.uni-passau.de
Sat May 25 07:25:41 AEST 1991


farhad at Sunburn.Stanford.EDU (Farhad Shakeri) writes:

>We are having some problem with named under Ultrix 4.1A that is
>causing a lot of headaches.
>[...]
>"May 22 09:34:31 LOCALHOST: 18415 named: accept: Too many open files"

We have the same problem here in Passau on our DECsystem 5810. We use
the following procedure to kill and restart the named in case of trouble.
We call it ctrlnamed and run it every 10 Minutes from cron.

BTW, the DEC service refuses to look into the problem. They say that
our installation is not supported because the named files are located
in /etc/namedb and not in /var/dss/namedb and we didn't use bindsetup
for installation.

If there is a real solution, let me know.

Michael

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/csh -f

set logfile=/var/adm/infolog
set killlog=/etc/namedb/killlog

set linenumber=10
set count=5

set current_pid=`cat /etc/named.pid`

set matchinglines = `tail -$linenumber $logfile | egrep  -e "$current_pid named.*Too many open files" | wc -l`


if ($matchinglines > $count) then
# something seems to go wrong
	kill `cat /etc/named.pid`
	/usr/etc/named
	# sleep, so named gets a chance to write his pid
	sleep 5
	set new_pid=`cat /etc/named.pid`
	echo "`date` restart named (old pid: $current_pid, new pid: $new_pid)" >>$killlog
	sleep 60
	endif

set current_pid=`cat /etc/named.pid`

if ("`ps augx | grep $current_pid | grep -v grep`" == "") then
# there is no named running
	/usr/etc/named
	# sleep, so named gets a chance to write his pid
	sleep 5
	set new_pid=`cat /etc/named.pid`
	echo "`date` *start* named (old pid: $current_pid, new pid: $new_pid)" >>$killlog
	endif
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
Michael Gengenbach, FORWISS Passau, gengenbach at forwiss.uni-passau.de



More information about the Comp.unix.ultrix mailing list