*BSD News Article 95957


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.mel.aone.net.au!news.mira.net.au!news.vbc.net!vbcnet-west!knews.uk0.vbc.net!vbcnet-gb!azure.xara.net!xara.net!newsfeed.nacamar.de!europa.clark.net!news-peer.sprintlink.net!news.sprintlink.net!Sprint!howland.erols.net!newspump.sol.net!posts.execpc.com!earth.execpc.com!not-for-mail
From: jgreco@ns.sol.net (Joe Greco)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: ifconfig limit reached?
Date: 23 May 1997 12:11:37 -0500
Organization: sol.net Network Services - Milwaukee, WI
Lines: 52
Sender: jgreco@earth.execpc.com
Message-ID: <5m4j49$o9e$1@earth.execpc.com>
References: <michelle-2205971722230001@monalisa.primelogic.com>
NNTP-Posting-Host: earth.execpc.com
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:41412

In comp.unix.bsd.freebsd.misc article <michelle-2205971722230001@monalisa.primelogic.com>, michelle@primelogic.com (Michelle Brownsworth) wrote:
:Today I added the 57th ifconfig line to our server's rc.local file as part
:of the routine adding of a virtual host.  I HUP'ed named and was greeted
:by a nameserver core dump and complaints of "too many files open."  And
:the nameserver was torched, naturally.  I rebooted the entire server, to
:no avail.  Thinking I'd made an error in one of the DNS files, I checked
:my work carefully and everything looked kosher; the forward,
:reverse--everything--seemed to be USDA-grade fine.  I recompiled the
:kernel after increasing the number of users from 20 to 50 and rebooted
:again.  No dice.  Mutter...

Yes, you did torch the nameserver - but that's all you torched.

The nameserver tries to bind a separate socket to each virtual IP address
on your machine.  This is bad if you have A Lot Of Interfaces, because
eventually it runs out of interfaces.

Some folks have recommended doing an "unlimit; named" but I don't think
that this really wins in the long run.

Real fixes include:  running named on a different machine, and having your
Web server use the other machine.  Or: running BIND 8.1 with the new
interface binding directive set to only use one interface.  Or: dig up the
bind-interfaces patch for BIND 4.9* that does the same thing.

You can run thousands of virtual hosts on a FreeBSD box.

Note that you'll eventually torch your Web server if it's not thoughtfully
configured (particularly if you have separate log files for each virtual
site).

:Since this state of affairs was precipitated by adding the new virtual it
:seemed logical to remove the additions that I'd made.  On a hunch, I
:commented out the ifconfig I'd added for the virtual, rebooted, and
:everything was back to normal.  Whew!
:
:So have I run up against some limit on the number of IP addresses that can
:be assigned to the network card?  Do I need to change some configuation
:variable that will increase the number of IP assignments the card can
:handle?  I've looked in the online docs, but haven't found anything that
:addressed this particular problem.  (OTOH, panicky readers sometimes miss
:things.)
:
:I'm running 2.1.5 on a P133 with 32 MB parity RAM.  As belt and
:suspenders, I've just ordered another 32 MB of parity RAM and a second
:network card.  I'm figuring if worse comes to worse, and it's not just a
:matter of increasing a variable to allow more IP assignments on the first
:card, the second network card will gain me another 50+ assignments.

Nope, it won't.

... JG