Date: Sat, 31 May 2003 19:25:02 +0100 From: Jez Hancock <jez.hancock@munk.nu> To: freebsd-questions@FreeBSD.org Subject: Re: file: table is full. Message-ID: <20030531182502.GA71235@users.munk.nu> In-Reply-To: <20030531163116.46943.qmail@web11806.mail.yahoo.com> References: <20030531163116.46943.qmail@web11806.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 31, 2003 at 09:31:16AM -0700, Hugo Saro wrote: > Hi list, > > I have a fbsd server as a gateway on my home lan. It's > running 4.7-STABLE , specs p200 mmx 80mb ram 2 hdd's > .. it works fine , but I do get a regular (sort of) > problem. > > When there's some problem with my ISP and dhclient > keeps trying getting an IP, eventually when I get home > i'll have lots of message spammed in the console, and > ps w ls etc will say too many open files in system. I > normally solved this by killing some processes, > unplugging and plugging the network cables, and by > killing dhclient. When it fired up again it would be > working. But today i couldn't even kill because it > said it couldn't open some .so (I'm sure they're > there) Try increasing the number of available file descriptors. You can do this dynamically at boot time using something like: kern.maxuser=64 in /etc/sysctl.conf, which assigns a suitable number of file descriptors for 64 users - for more info see 'man tuning' - but also increases various other kernel flags as well. Make sure to check your current 'maxusers' sysctl setting - something like: sysctl -a | grep maxusers should work... also look at some of the other sysctl settings whilst you're at it: sysctl -a | grep file maybe? I get this on my system: [19:15:37] munk@users /home/munk# sysctl -a | grep file kern.maxfiles: 8168 kern.bootfile: /kernel kern.maxfilesperproc: 7351 kern.openfiles: 751 kern.corefile: %N.core kern.filedelay: 30 p1003_1b.mapped_files: 0 where my maxusers is set dynamically by the kernel (options MAXUSERS 0 in the kernel config file iirc), and at boot is set to 256. Looking at the amount of ram you have though, be careful not to increase the number of file descriptors too much otherwise you'll get a lot of swapping out to disk going on. In general however check your logfiles to see why so many file descriptors are being eaten up. For example I once used cronolog to log httpd transfers and errors for around 300 users, and each cronolog instance required 2 processes/file descriptors, meaning a total of 1200 file descriptors just for logging! The number of file descriptors soon maxed out because the available fds wasn't enough. Also see the manpage for 'fstat', which tells you about what files are currently open on your system. HTH, Jez
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030531182502.GA71235>