Re: Postgres crash during low-traffic period, need advice.

From: Benoit Clennett-Sirois <benoit(at)lesite(dot)ca>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgres crash during low-traffic period, need advice.
Date: 2010-12-20 16:12:32
Message-ID: AANLkTimSrhbpJp3mNh0Ze9hMxC1dJcGK-cRZpzCXftpn@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

work_mem is not set in the config file, so it's using the default setting..

On Mon, Dec 20, 2010 at 9:34 AM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> On Mon, Dec 20, 2010 at 6:41 AM, Benoit Clennett-Sirois
> <benoit(at)lesite(dot)ca> wrote:
>> Hi,
>>
>> We have a front-end server taking care of Nginx, memcached and
>> Postgresql. Last night the postgres daemon crashed (traffic was very
>> low at that time) with the following error:
>>
>> 2010-12-20 03:34:30 EST DETAIL:  Failed system call was
>> shmget(key=5432001, size=1124474880, 03600).
>> 2010-12-20 03:34:30 EST 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 1124474880
>> bytes), reduce PostgreSQL's shared_buffers parameter (currently
>> 131072) and/or its max_connections parameter (currently 963).
>
> Are you sure this is the crash and not the symptom of a restart issue
> or something?
>
> I'd look more carefully through the logs for the PANIC that a crash
> should cause.  I'm guessing you got killed by the OOM killer.  4 Gigs
> is pitiful for a multi-purpose db / web server, my son's laptop has 8
> gigs.  What do you have work_mem set to?  A high setting there can be
> quickly fatal since it's per-sort, not total.
>
> Generally shared_buffers ~1Gig on a 4Gig machine would be reasonable
> if it was just a db server.  If it's shared with other stuff, drop it
> down to the 100Meg range.
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2010-12-20 16:29:23 Re: Is any 'upgrade' required to move a 9.0.1 cluster to 9.0.2?
Previous Message bricklen 2010-12-20 16:08:40 Re: Is any 'upgrade' required to move a 9.0.1 cluster to 9.0.2?