Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 447759FB85A for ; Tue, 16 Oct 2007 13:01:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 09383-06 for ; Tue, 16 Oct 2007 13:01:14 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.187]) by postgresql.org (Postfix) with ESMTP id EBAD19FB744 for ; Tue, 16 Oct 2007 13:01:13 -0300 (ADT) Received: by rv-out-0910.google.com with SMTP id l15so1295820rvb for ; Tue, 16 Oct 2007 09:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:disposition-notification-to:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=iEr97hFHc6Qg6foYn7cgU47IdRvX40csQIkmZQ/iBTI=; b=jUCrJGJNJAULy2HH2+BsUIfeSScvtnCnOjWB6Ihgq1hgS+wrX/GK8++5t3xPtLrXwMixYQ4Q9eCuKoS4tK0XbMD/6cdJh5jZni6DBfXt+8McX2f2eFlE1QdaXc8Q59d82CEpSHqS4zgYBO70nSMa6BhkhtOPFXGSpkmvUvKU9mM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:disposition-notification-to:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=SLUE1m+xAO1q3q4LoycHd/Ut+OsYNtXcGxasJhTDSQFt3c/P3dnySb5Kubwes/ItXwX0Guay++tjdV3XEeLWaBAc2uU4ApZAC6sTUx7G4Ppe2GXAp+sepNhQ0BJSzKPRnkBDP6E1ZhCV65pujXnfg3c7sxVK9mbbYbc0XvlucrQ= Received: by 10.141.171.6 with SMTP id y6mr3602992rvo.1192550472487; Tue, 16 Oct 2007 09:01:12 -0700 (PDT) Received: from ?222.71.198.221? ( [222.71.198.221]) by mx.google.com with ESMTPS id f21sm8060736rvb.2007.10.16.09.01.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Oct 2007 09:01:10 -0700 (PDT) Message-ID: <4714E039.9000005@gmail.com> Date: Wed, 17 Oct 2007 00:00:57 +0800 From: =?UTF-8?B?5p2O5b2mIElhbiBMaQ==?= User-Agent: Mozilla-Thunderbird 2.0.0.6 (X11/20071009) MIME-Version: 1.0 To: Jason Lustig CC: pgsql-performance@postgresql.org Subject: Re: Autovacuum running out of memory References: <374EB3D1-EE74-4B8C-9EEC-104ADD097568@brandeis.edu> <4714A458.5060408@archonet.com> <4714AD30.6000103@archonet.com> <57031F92-40D5-4832-8B76-FB73E510C735@brandeis.edu> <4714C426.3080207@archonet.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/190 X-Sequence-Number: 27212 How about shared memory related settings of your kernel? ie. kernel.shmall, kernel.shmmax . Have a check with sysctl, maybe they should be raised: http://www.postgresql.org/docs/8.2/interactive/kernel-resources.html Regards Jason Lustig wrote: > I ran "ulimit -a" for the postgres user, and here's what I got: > > core file size (blocks, -c) 200000 > data seg size (kbytes, -d) 200000 > max nice (-e) 0 > file size (blocks, -f) unlimited > pending signals (-i) 32635 > max locked memory (kbytes, -l) 32 > max memory size (kbytes, -m) 200000 > open files (-n) 100 > pipe size (512 bytes, -p) 8 > POSIX message queues (bytes, -q) 819200 > max rt priority (-r) 0 > stack size (kbytes, -s) 8192 > cpu time (seconds, -t) unlimited > max user processes (-u) 100 > virtual memory (kbytes, -v) 200000 > file locks (-x) unlimited > > > > -- > Jason Lustig > Israel: 054-231-8476 > U.S.: 716-228-8729 > Skype: jasonlustig > > > On Oct 16, 2007, at 10:01 AM, Richard Huxton wrote: > >> Jason Lustig wrote: >>> I lowered the maintenance_work_mem to 50MB and am still getting the >>> same errors: >>> Oct 16 09:26:57 [16402]: [1-1] user=,db= ERROR: out of memory >>> Oct 16 09:26:57 [16402]: [1-2] user=,db= DETAIL: Failed on request >>> of size 52428798. >>> Oct 16 09:27:57 [16421]: [1-1] user=,db= ERROR: out of memory >>> Oct 16 09:27:57 [16421]: [1-2] user=,db= DETAIL: Failed on request >>> of size 52428798. >>> Oct 16 09:29:44 [16500]: [1-1] user=,db= ERROR: out of memory >>> Oct 16 09:29:44 [16500]: [1-2] user=,db= DETAIL: Failed on request >>> of size 52428798. >> >> Hmm - it's now failing on a request of 50MB, which shows it is in fact >> maintenance_work_mem that's the issue. >> >>> Looking at my free memory (from TOP) I find >>> Mem: 2062364k total, 1846696k used, 215668k free, 223324k buffers >>> Swap: 2104496k total, 160k used, 2104336k free, 928216k cached >>> So I don't think that I'm running out of memory total... it seems >>> like it's continually trying to do it. Is there a reason why Postgres >>> would be doing something without a username or database? Or is that >>> just how autovacuum works? >> >> I've not seen an error at startup before, but if it's not connected >> yet then that would make sense. >> >> I'm guessing this is a per-user limit that the postgres user is >> hitting. If you "su" to user postgres and run "ulimit -a" that should >> show you if you have any limits defined. See "man bash" for more >> details on ulimit. >> >> >> -- >> Richard Huxton >> Archonet Ltd >