From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Wells Oliver <woliver@padres.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Server crash... trying to figure it out
Date: Tue, 31 May 2011 13:31:49 -0500
Message-ID: <4DE4EDC5020000250003DF1B@gw.wicourts.gov> (raw)
In-Reply-To: <509F1BCA-2A75-41F4-87F5-EBD098023D71@padres.com>
References: <509F1BCA-2A75-41F4-87F5-EBD098023D71@padres.com>
Wells Oliver <woliver@padres.com> wrote:
> This has happened twice over the last couple of nights:
>
> 2011-05-30 02:08:27 PDT LOG: server process (PID 29979) was
> terminated by signal 9: Killed
> 2011-05-30 02:08:31 PDT FATAL: could not create shared memory
> segment: Cannot allocate memory
> To reduce the request size (currently 6595420160 bytes), reduce
> PostgreSQL's shared_buffers parameter [...]
> The value of shared_buffers is set to 6GB, work_mem is 64MB,
> maintenance_work_mem is 128MB, effective_cache_size is 4GB.
>
> max_connections is set to 200.
>
> Any ideas here? The system has 12GB; raising the shared_buffers
> seems reasonable but 6GB also feels like it should be sufficient.
You're probably overcommitting memory and running afoul of the oom
killer.
You've got an actual 12MB, but you can easily allocate up to
shared_buffers + (user_connections * work_mem), which is 18.5 GB. I
would start by reducing shared_buggers to 3GB or less, and cut
work_mem in half. Then I would get a connection pooler set up to
funnel 200 client-side connections through a pool of 10 or 20
database connections. Then I would try edging up work_mem while
monitoring performance and memory usage.
-Kevin
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, woliver@padres.com
Subject: Re: Server crash... trying to figure it out
In-Reply-To: <4DE4EDC5020000250003DF1B@gw.wicourts.gov>
References: <509F1BCA-2A75-41F4-87F5-EBD098023D71@padres.com> <4DE4EDC5020000250003DF1B@gw.wicourts.gov>
* 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