Обсуждение: Resource temporarily unavailable

Поиск
Список
Период
Сортировка

Resource temporarily unavailable

От
"Ben-Nes Michael"
Дата:
Hi everyone

From time to time i get the following error:
could not fork new process for connection: Resource temporarily unavailable

im using Postgres 7.4.5, with kernel 2.6.2

my conf is:

max_connections = 400

and system is:

www3:/etc/postgresql# ulimit -a
core file size        (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) unlimited
max memory size       (kbytes, -m) unlimited
open files                    (-n) 1024
pipe size          (512 bytes, -p) 8
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) 256
virtual memory        (kbytes, -v) unlimited

im totaly bogus, any ideas ?

Thanks
--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
Fax: 972-4-6990098
http://www.canaan.net.il
--------------------------

Re: Resource temporarily unavailable

От
Tom Lane
Дата:
"Ben-Nes Michael" <miki@canaan.co.il> writes:
> From time to time i get the following error:
> could not fork new process for connection: Resource temporarily unavailable

This generally means that the kernel has run out of memory.

> my conf is:
> max_connections = 400

Perhaps that is overly optimistic for your available hardware.

            regards, tom lane

Re: Resource temporarily unavailable

От
Russell Smith
Дата:
>
> max_connections = 400
>
> www3:/etc/postgresql# ulimit -a
> max user processes            (-u) 256

> im totaly bogus, any ideas ?
>

Well, your allowing postgres to have 400 connection which is at least 400 processes if not  a few more.
And you are ulimiting the postgres user to 256 processes.  So the kernel says out of process space for that user.

Regards

Russell Smith

Re: Resource temporarily unavailable

От
Ben-Nes Michael
Дата:
> >
> > max_connections = 400
> >
> > www3:/etc/postgresql# ulimit -a
> > max user processes            (-u) 256
>
> > im totaly bogus, any ideas ?
> >
>
> Well, your allowing postgres to have 400 connection which is at least 400
processes if not  a few more.
> And you are ulimiting the postgres user to 256 processes.  So the kernel
says out of process space for that user.

Its the default values. can any one hint me where to change this ?

>
> Regards
>
> Russell Smith
>

--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
Fax: 972-4-6990098
http://www.canaan.net.il
--------------------------