From owner-freebsd-isp@FreeBSD.ORG Tue Sep 27 12:42:42 2005 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2939D16A420 for ; Tue, 27 Sep 2005 12:42:42 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from leto.uk.clara.net (leto.uk.clara.net [80.168.69.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id A015E43D53 for ; Tue, 27 Sep 2005 12:42:41 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from bloodhound.noc.clara.net ([195.8.70.207]) by leto.uk.clara.net with esmtp (Exim 4.43) id 1EKEnA-000E9z-RA; Tue, 27 Sep 2005 13:42:40 +0100 Received: from personal by bloodhound.noc.clara.net with local (Exim 4.52 (FreeBSD)) id 1EKEnR-000Coh-FK; Tue, 27 Sep 2005 13:42:57 +0100 Date: Tue, 27 Sep 2005 13:42:57 +0100 From: Brian Candler To: Steve Rieger Message-ID: <20050927124256.GA49100@uk.tiscali.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-isp@freebsd.org Subject: Re: FATAL: erealloc(): Unable to allocate 577925121 bytes X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 12:42:42 -0000 > as far as i can see i am not doing anything wrong, then why cant i > download a 551 MB file You're probably hitting the default 512MB maximum process data segment limit somewhere, I guess on the client end as I would expect Apache to use sendfile() to transmit a large file. Try typing: $ ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) 524288 << THIS LIMIT file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 11095 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 65536 cpu time (seconds, -t) unlimited max user processes (-u) 5547 virtual memory (kbytes, -v) unlimited Now, I can never remember how to increase this, and I always have to rummage around the kernel source code. Ah yes, it's options MAXDSIZ=(1024UL*1024*1024) in the kernel configuration. See /usr/src/sys/conf/NOTES However, it seems to me that's the wrong thing to do here. If an application needs to download 1G of data, then it really should download it and spool it to disk as it goes, not spool it all into RAM and then finally write it to disk (or worse, spool it into RAM, which gets spooled to swap space on disk, which then later gets pulled back into RAM and then finally written to the filesystem). At least, that's a very poor utilisation of system resources. Regards, Brian.