X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B24323A5A79 for ; Wed, 26 Jan 2005 04:24:25 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56557-02 for ; Wed, 26 Jan 2005 04:24:23 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.199]) by svr1.postgresql.org (Postfix) with ESMTP id 305B03A5A5B for ; Wed, 26 Jan 2005 04:24:22 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 67so3916wri for ; Tue, 25 Jan 2005 20:24:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=VIoJ+2NY8V46zcj6N7MYxHlfs2u92q8DhYipu0N6m0Lk8XgX2v3UbpaGDQbYXM1dSWknKQswodEE6nRHihRhmVK/pjZ3syLkFn0gLU8fw8ziVl6CRVOQcBfWGEHFNGtXD/8yVMsWokCbObyvb8ELfQChaTP+IoxlzV0JtWWusNQ= Received: by 10.54.48.73 with SMTP id v73mr16487wrv; Tue, 25 Jan 2005 20:24:15 -0800 (PST) Received: by 10.54.4.71 with HTTP; Tue, 25 Jan 2005 20:24:15 -0800 (PST) Message-ID: <6c21003b05012520241a9b3d48@mail.gmail.com> Date: Tue, 25 Jan 2005 22:24:15 -0600 From: Don Drake Reply-To: Don Drake To: Tom Lane Subject: Re: Postgres stopped running (shmget failed) Cc: pgsql-performance@postgresql.org In-Reply-To: <3962.1106669885@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <6c21003b05012507104989efed@mail.gmail.com> <3962.1106669885@sss.pgh.pa.us> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200501/490 X-Sequence-Number: 10180 On Tue, 25 Jan 2005 11:18:05 -0500, Tom Lane wrote: > Don Drake writes: > > This morning I found the postgres not running and the following in my log file: > > > 2005-01-25 01:38:22 FATAL: could not create shared memory segment: > > Cannot allocate memory > > DETAIL: Failed system call was shmget(key=5432001, size=273383424, 03600). > > HINT: This error usually means that PostgreSQL's request for a shared > > memory segment exceeded available memory or swap space. To reduce the > > request size (currently 273383424 bytes), reduce PostgreSQL's > > shared_buffers parameter (currently 32768) and/or its max_connections > > parameter (currently 40). > > I have seen this happen when the old shmem segment didn't get released > for some reason, and your kernel settings are such that it won't allow > creation of two shmem segments of that size at once. For robustness > it's probably a good idea to make sure you *can* create two such > segments at once, but for the moment getting rid of the old one with > "ipcrm" should be enough to let you restart the postmaster. > > regards, tom lane > I was able to just restart it, after the server died and before I restarted nothing showed up in the ipcs output. On an unrelated note, the value 273MB seems relatively low to me. The DB uses over 27GB for data and indexes, I would think it needs more shared memory. Thanks. -Don -- Donald Drake President Drake Consulting http://www.drakeconsult.com/ 312-560-1574