Re: "Out of memory" errors..

From: "Lim Berger" <straightfwd007(at)gmail(dot)com>
To: "Bill Moran" <wmoran(at)potentialtech(dot)com>
Cc: "Postgresql General List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: "Out of memory" errors..
Date: 2007-08-13 15:29:09
Message-ID: 69d2538f0708130829l4ecd7b8ei20d1ff6c66a58bb9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/13/07, Bill Moran <wmoran(at)potentialtech(dot)com> wrote:
> In response to "Lim Berger" <straightfwd007(at)gmail(dot)com>:
>
> > On 8/13/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > > "Lim Berger" <straightfwd007(at)gmail(dot)com> writes:
> > > > ERROR: out of memory
> > > > DETAIL: Failed on request of size 67108860.
> > >
> > > Apparently, this number:
> > >
> > > > maintenance_work_mem = 64MB
> > >
> > > is more than your system can actually support. Which is a bit odd for
> > > any modern-day machine. I suspect the postmaster is being started with
> > > an unduly small ulimit.
> > >
> > > regards, tom lane
> >
> > Thanks Tom. Where can I check the "ulimit"? Is it in the config?
> >
> > I did a "ulimit -a" (found the command through Google, on an archive
> > posting by in fact you! -- http://snipr.com/pg_ulimit ) and got the
> > following output:
> >
> >
> > ~ > ulimit -a
> > core file size (blocks, -c) 1000000
> > data seg size (kbytes, -d) unlimited
> > file size (blocks, -f) unlimited
> > pending signals (-i) 1024
> > max locked memory (kbytes, -l) 32
> > max memory size (kbytes, -m) unlimited
> > open files (-n) 4096
> > pipe size (512 bytes, -p) 8
> > POSIX message queues (bytes, -q) 819200
> > stack size (kbytes, -s) 8192
> > cpu time (seconds, -t) unlimited
> > max user processes (-u) 14335
> > virtual memory (kbytes, -v) unlimited
> > file locks (-x) unlimited
> >
> >
> > Any idea how to configure this? That is how that thread on an archived
> > discussion ends too -- the poster did not seem to get any response to
> > his question about how to tweak this.
>
> Make sure your run the command as the same user that PG runs as (usually
> "postgres", but sometimes "pgsql") ulimits can differ from one user to
> another.
>

Thanks. I did "su postgres" and ran the ulimit command again. All
values are the same, except for "open files" which is double in the
case of this user (instead of 4096, it is 8192). Not sure what I can
gather from that?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Coulthard 2007-08-13 15:34:19 Re: Unable to connect to PostgreSQL server via PHP
Previous Message Bill Moran 2007-08-13 15:24:25 Re: "Out of memory" errors..