Re: "Out of memory" errors.. - Mailing list pgsql-general

From Tom Lane
Subject Re: "Out of memory" errors..
Date
Msg-id 9255.1187061219@sss.pgh.pa.us
Whole thread Raw
In response to Re: "Out of memory" errors..  ("Lim Berger" <straightfwd007@gmail.com>)
List pgsql-general
"Lim Berger" <straightfwd007@gmail.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

pgsql-general by date:

Previous
From: "Lim Berger"
Date:
Subject: Re: Postgresql INSERT speed (how to improve performance)?
Next
From: Tom Lane
Date:
Subject: Re: Postgresql INSERT speed (how to improve performance)?