Skip site navigation (1) Skip section navigation (2)

Re: Postgres stopped running (shmget failed)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Don Drake <dondrake(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgres stopped running (shmget failed)
Date: 2005-01-25 16:18:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Don Drake <dondrake(at)gmail(dot)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

In response to


pgsql-performance by date

Next:From: Peter DarleyDate: 2005-01-25 16:49:58
Subject: Re: PgPool changes WAS: PostgreSQL clustering VS MySQL
Previous:From: Tom LaneDate: 2005-01-25 15:41:53
Subject: Re: PostgreSQL clustering VS MySQL clustering

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group