Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!math.fu-berlin.de!fauern!forwiss.uni-passau.de!gengenba From: gengenba@forwiss.uni-passau.de (Michael Gengenbach) Newsgroups: comp.unix.ultrix Subject: Re: Run away named "accept: Too many open files" Ultrix 4.1A Message-ID: <1991May24.212541.13227@forwiss.uni-passau.de> Date: 24 May 91 21:25:41 GMT References: <1991May23.001937.2384@neon.Stanford.EDU> Sender: usenet@forwiss.uni-passau.de (USENET News System) Organization: University of Passau, Germany Lines: 58 Nntp-Posting-Host: forwiss.uni-passau.de farhad@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@forwiss.uni-passau.de