Re: Help me stop postgres from crashing.

From: Samuel <sam(at)palo-verde(dot)us>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Help me stop postgres from crashing.
Date: 2010-04-25 18:00:29
Message-ID: ac218483-caa0-4c65-8629-3dd417871093@n20g2000prh.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Apr 24, 3:53 pm, thombr(dot)(dot)(dot)(at)gmail(dot)com (Thom Brown) wrote:
> On 24 April 2010 18:48, Sam <s(dot)(dot)(dot)(at)palo-verde(dot)us> wrote:
>
>
>
>
>
> > Hi,
>
> > I am a web developer, I've been using postgesql for a few years but
> > administratively I am a novice.
>
> > A particular web application I am working has a staging version
> > running one a vps, and a production version running on another vps.
> > They both get about the same usage, but the production version keeps
> > crashing and has to be re-started daily for the last couple days.  The
> > log file at the time of crash looks like this:
>
> > LOG:  could not accept new connection: Cannot allocate memory
> > LOG:  select() failed in postmaster: Cannot allocate memory
> > FATAL:  semctl(2457615, 0, SETVAL, 0) failed: Invalid argument
> > LOG:  logger shutting down
> > LOG:  database system was interrupted at 2010-04-24 09:33:39 PDT
>
> > It ran out of memory.
>
> > I am looking for a way to track down what is actually causing the
> > memory shortage and how to prevent it or increase the memory
> > available.
>
> > The vps in question is a media temple DV running CentOS and postgres
> > 8.1.18
>
> > Could you provide some more information?  What do you get if you run
>
> "sysctl -a | grep kernel.shm" and "sysctl -a | grep sem"? And what are you
> developing in which connects to the database?  Are you using persistent
> connections?  And how many connections to you estimate are in use?  What
> have you got max_connections and shared_buffers in your postgresql.conf
> file?  And how much memory does your VPS have?
>
> Thom

sysctl -a | grep kernel.shm
error: "Operation not permitted" reading key "kernel.cap-bound"
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 33554432

sysctl -a | grep sem
error: "Operation not permitted" reading key "kernel.cap-bound"
kernel.sem = 250 32000 32 128

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2010-04-25 18:18:12 Re: Problem saving emails to database.
Previous Message Jeff Ross 2010-04-25 18:00:25 Plpgsql function syntax error at first coalesce statement