Re: "Out of memory" errors..

Поиск
Список
Период
Сортировка
От Lim Berger
Тема Re: "Out of memory" errors..
Дата
Msg-id 69d2538f0708131947l45f7f110i32e247d214701749@mail.gmail.com
обсуждение исходный текст
Ответ на Re: "Out of memory" errors..  ("Sander Steffann" <s.steffann@computel.nl>)
Ответы Re: "Out of memory" errors..
Список pgsql-general
On 8/14/07, Sander Steffann <s.steffann@computel.nl> wrote:
> Hi Lim,
>
> >> It might also be in /etc/security/limits.conf.
> >
> > Thanks. I see these two lines in that file:
> >
> > postgres        soft    nofile  8192
> > postgres        hard    nofile  8192
> >
> > How should I change these values? I am not sure how this reflects the
> > "ulimit" options.
>
> Those are limits to the allowed number of open files (ulimit -n). I think
> 8192 should be enough for PostgreSQL. The problem you had were related to
> other settings, so if only the "nofile" setting is changed your strange
> ulimits do not come from here :-)


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, but
how can I change the line "if [ "$LIMITUSER" != "root" ];" to include
the postgres user as well? Can I do something like:

   if [ "$LIMITUSER" != "root" and "$LIMITUSER" != "postgres" ];

Would appreciate any thoughts!

В списке pgsql-general по дате отправления:

Предыдущее
От: "Lim Berger"
Дата:
Сообщение: Postgresql INSERT speed (how to improve performance)?
Следующее
От: Ow Mun Heng
Дата:
Сообщение: Copy command and duplicate items (Support Replace?)