From: Don Drake <dondrake@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres stopped running (shmget failed)
Date: Tue, 25 Jan 2005 22:24:15 -0600
Message-ID: <6c21003b05012520241a9b3d48@mail.gmail.com> (raw)
In-Reply-To: <3962.1106669885@sss.pgh.pa.us>
References: <6c21003b05012507104989efed@mail.gmail.com>
<3962.1106669885@sss.pgh.pa.us>
On Tue, 25 Jan 2005 11:18:05 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Don Drake <dondrake@gmail.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: dondrake@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: Postgres stopped running (shmget failed)
In-Reply-To: <6c21003b05012520241a9b3d48@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox