From owner-freebsd-questions@FreeBSD.ORG Sat Aug 19 21:05:08 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57D1216A4DA for ; Sat, 19 Aug 2006 21:05:08 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from virtual.micronet.sk (smtp.micronet.sk [84.16.32.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1ED6743D66 for ; Sat, 19 Aug 2006 21:05:01 +0000 (GMT) (envelope-from danger@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by virtual.micronet.sk (Postfix) with ESMTP id 05C3410E5F3; Sat, 19 Aug 2006 23:04:54 +0200 (CEST) X-Virus-Scanned: by amavisd-new at virtual.micronet.sk Received: from virtual.micronet.sk ([127.0.0.1]) by localhost (virtual.micronet.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FQ4K4cEfdXIO; Sat, 19 Aug 2006 23:04:52 +0200 (CEST) Received: from danger.mcrn.sk (danger.mcrn.sk [84.16.37.254]) by virtual.micronet.sk (Postfix) with ESMTP id 9358110E5D2; Sat, 19 Aug 2006 23:04:52 +0200 (CEST) Date: Sat, 19 Aug 2006 23:04:50 +0200 From: Daniel Gerzo Organization: The FreeBSD Project X-Priority: 3 (Normal) Message-ID: <332938182.20060819230450@rulez.sk> To: "Lisa Casey" In-Reply-To: <000501c6c3cf$044f72c0$e0891342@net> References: <000501c6c3cf$044f72c0$e0891342@net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Tuning FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Gerzo List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 21:05:08 -0000 Hello Lisa, Saturday, August 19, 2006, 10:35:29 PM, you wrote: > Hi Folksm > I'm getting these on a FreeBSD 5.3 box: > Aug 19 15:46:32 radius sm-mta[12850]: k7JJk1rt012776: SYSERR(UID0): fill_fd: > disconnect: cannot open /dev/null: > Too many open files in system > Aug 19 15:46:40 radius kernel: kern.maxfiles limit exceeded by uid 0, please > see tuning(7). > Aug 19 15:46:40 radius kernel: kern.maxfiles limit exceeded by uid 0, please > see tuning(7). > Aug 19 15:46:35 radius sm-mta[12784]: k7JJk7F0012784: SYSERR(UID0): queueup: > cannot create queue file ./qfk7JJk > 7F0012784, euid=0, fd=-1, fp=0x0: Too many open files in system > I checked, and the system shows: > radius# sysctl kern.maxfiles > kern.maxfiles: 1416 > radius# sysctl kern.maxusers > kern.maxusers: 43 > I googled and read that kern.maxfiles is dependent upon kern.maxusers and > that I shou;d raise maxusers which I tried to do via sysctl: I don't think that this is really required. Just raise the kern.maxfiles sysctl if you really need to do so. I would rather search for the reason why I need to allow kernel to open such many number of files. Allowing it to open too many files can lead to a Denial of Service. > radius# sysctl -w kern.maxusers=50 > sysctl: oid 'kern.maxusers' is a read only tunable > sysctl: Tunable values are set in /boot/loader.conf > My /boot/loader.conf is a zero byte length file. That is not problem. There is no /boot/loader.conf by default (IIRC) although there is /boot/defaults/loader.conf > How can I fix this too many open files problem? > Thanks, > Lisa Casey -- Best regards, Daniel mailto:danger@FreeBSD.org