Re: "Out of memory" errors..

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Lim Berger" <straightfwd007(at)gmail(dot)com>
Cc: "Sander Steffann" <s(dot)steffann(at)computel(dot)nl>, "Postgresql General List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: "Out of memory" errors..
Date: 2007-08-14 03:13:39
Message-ID: 9255.1187061219@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Lim Berger" <straightfwd007(at)gmail(dot)com> writes:
> I think I have located the problem. It is in "/etc/profile" where some
> ulimits are added. This is the offending text, I think:

> #********************* cPanel Added Limit Protections -- BEGIN

> #unlimit so we can run the whoami
> ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000
> -v unlimited 2>/dev/null

> LIMITUSER=$USER
> if [ -e "/usr/bin/whoami" ]; then
> LIMITUSER=`/usr/bin/whoami`
> fi
> if [ "$LIMITUSER" != "root" ]; then
> ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v
> 200000 2>/dev/null
> else
> ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c
> 1000000 -v unlimited 2>/dev/null
> fi
> #********************* cPanel Added Limit Protections -- END

> I am not much of a shell scripter so I am afraid of breaking this,

My advice: remove the whole block that you've quoted. After that, find
out what "cPanel" is, and get rid of that entire piece of brain-damage.
There might be some merit to restrictions as draconian as the above on
an overloaded multi-user machine, but there is no call for anything to
install restrictions like that behind the back of the machine's admin.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-08-14 03:20:51 Re: Postgresql INSERT speed (how to improve performance)?
Previous Message Lim Berger 2007-08-14 03:06:47 Re: Postgresql INSERT speed (how to improve performance)?