out of memory

--_e372b9b8-3540-4f1a-b0d1-35043e62140f_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



Hi

I have a dedicated database server with 16 GB of RAM.

and the oom-killer is killing my database

this is the output kernel:

postmaster invoked oom-killer: gfp_mask=3D0xd0=2C order=3D1=2C oomkilladj=
=3D0
Pid: 16667=2C comm: postmaster Tainted: G W 2.6.27.6 #7
[<c10510f9>] oom_kill_process+0x103/0x1d5
[<c11c14cc>] security_capable+0x9/0xa
[<c1050f0d>] badness+0x118/0x201
[<c10513fc>] out_of_memory+0x231/0x265
[<c1053300>] __alloc_pages_internal+0x322/0x447
[<c106ac5e>] alloc_pages_current+0x59/0x89
[<c1051c2c>] __get_free_pages+0xa/0x16
[<c101f815>] copy_process+0xa2/0xeaa
[<c1020683>] do_fork+0x66/0x2c3
[<c1001a59>] sys_clone+0x32/0x36
[<c100334a>] syscall_call+0x7/0xb
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D
Mem-Info:
Node 0 DMA per-cpu:
CPU 0: hi: 0=2C btch: 1 usd: 0
CPU 1: hi: 0=2C btch: 1 usd: 0
CPU 2: hi: 0=2C btch: 1 usd: 0
CPU 3: hi: 0=2C btch: 1 usd: 0
CPU 4: hi: 0=2C btch: 1 usd: 0
CPU 5: hi: 0=2C btch: 1 usd: 0
CPU 6: hi: 0=2C btch: 1 usd: 0
CPU 7: hi: 0=2C btch: 1 usd: 0
CPU 8: hi: 0=2C btch: 1 usd: 0
CPU 9: hi: 0=2C btch: 1 usd: 0
CPU 10: hi: 0=2C btch: 1 usd: 0
CPU 11: hi: 0=2C btch: 1 usd: 0
CPU 12: hi: 0=2C btch: 1 usd: 0
CPU 13: hi: 0=2C btch: 1 usd: 0
CPU 14: hi: 0=2C btch: 1 usd: 0
CPU 15: hi: 0=2C btch: 1 usd: 0
Node 0 Normal per-cpu:
CPU 0: hi: 186=2C btch: 31 usd: 0
CPU 1: hi: 186=2C btch: 31 usd: 30
CPU 2: hi: 186=2C btch: 31 usd: 0
CPU 3: hi: 186=2C btch: 31 usd: 0
CPU 4: hi: 186=2C btch: 31 usd: 0
CPU 5: hi: 186=2C btch: 31 usd: 0
CPU 6: hi: 186=2C btch: 31 usd: 26
CPU 7: hi: 186=2C btch: 31 usd: 26
CPU 8: hi: 186=2C btch: 31 usd: 0
CPU 9: hi: 186=2C btch: 31 usd: 0
CPU 10: hi: 186=2C btch: 31 usd: 0
CPU 11: hi: 186=2C btch: 31 usd: 0
CPU 12: hi: 186=2C btch: 31 usd: 0
CPU 13: hi: 186=2C btch: 31 usd: 0
CPU 14: hi: 186=2C btch: 31 usd: 0
CPU 15: hi: 186=2C btch: 31 usd: 25
Node 0 HighMem per-cpu:
CPU 0: hi: 186=2C btch: 31 usd: 0
CPU 1: hi: 186=2C btch: 31 usd: 30
CPU 2: hi: 186=2C btch: 31 usd: 0
CPU 3: hi: 186=2C btch: 31 usd: 0
CPU 4: hi: 186=2C btch: 31 usd: 0
CPU 5: hi: 186=2C btch: 31 usd: 167
CPU 6: hi: 186=2C btch: 31 usd: 25
CPU 7: hi: 186=2C btch: 31 usd: 19
CPU 8: hi: 186=2C btch: 31 usd: 0
CPU 9: hi: 186=2C btch: 31 usd: 0
CPU 10: hi: 186=2C btch: 31 usd: 0
CPU 11: hi: 186=2C btch: 31 usd: 0
CPU 12: hi: 186=2C btch: 31 usd: 0
CPU 13: hi: 186=2C btch: 31 usd: 0
CPU 14: hi: 186=2C btch: 31 usd: 0
CPU 15: hi: 186=2C btch: 31 usd: 23
Active:1573667 inactive:609150 dirty:46 writeback:107 unstable:0
free:1750894 slab:31196 mapped:538832 pagetables:143359 bounce:0
Node 0 DMA free:3540kB min:64kB low:80kB high:96kB active:0kB inactive:0kB =
prese =
nt:15836kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 873 16095 16095
Node 0 Normal free:28132kB min:3744kB low:4680kB high:5616kB active:840kB i=
nacti =
ve:892kB present:894080kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 121778 121778
Node 0 HighMem free:6971904kB min:512kB low:16836kB high:33160kB active:629=
3828k =
B inactive:2435708kB present:15587608kB pages_scanned:0 all_unreclai=
mable? no
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 113*4kB 11*8kB 1*16kB 1*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1=
024kB =
1*2048kB 0*4096kB =3D 3660kB
Node 0 Normal: 6429*4kB 147*8kB 9*16kB 2*32kB 2*64kB 1*128kB 0*256kB 1*512k=
B 1*1 =
024kB 0*2048kB 0*4096kB =3D 28892kB
Node 0 HighMem: 690211*4kB 364384*8kB 72902*16kB 3650*32kB 17*64kB 50*128kB=
5*25 =
6kB 2*512kB 1*1024kB 0*2048kB 1*4096kB =3D 6974060kB
1920296 total pagecache pages
0 pages in swap cache
Swap cache stats: add 913280=2C delete 913280=2C find 207387/229468
Free swap =3D 1754452kB
Total swap =3D 3904552kB
4390911 pages RAM
4161535 pages HighMem
268987 pages reserved
6066507 pages shared
1384540 pages non-shared
Out of memory: kill process 13279 (postmaster) score 546058 or a child
Killed process 13279 (postmaster)


This is the output of free -m before and after the kill

free -m
total used free shared buffers cached
Mem: 16101 9302 6799 0 3 7521
-/+ buffers/cache: 1776 14324
Swap: 3813 2099 1713


free -m
total used free shared buffers cached
Mem: 16101 5606 10494 0 7 5410
-/+ buffers/cache: 188 15912
Swap: 3813 2099 1713


the sysctl.conf with
kernel.shmmax =3D 10737418240
vm.overcommit_memory =3D 2

I do not what why the oom-killer kill the postgres if there are available m=
emory.

I would appreciate any help

Regars...

____________________________________________________________ _____
=BFQuieres transformarte en un emotic=F3n de Messenger? Descubre c=F3mo
www.messengernews.com.mx=

--_e372b9b8-3540-4f1a-b0d1-35043e62140f_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
</style>
</head>
<body class=3D'hmmessage'>
<br>Hi<br><br>I have a dedicated database server with 16 GB of RAM.<br><br>=
and the oom-killer is killing my database<br><br>this is the output kernel:=
<br><br>postmaster invoked oom-killer: gfp_mask=3D0xd0=2C order=3D1=2C oomk=
illadj=3D0<br>Pid: 16667=2C comm: postmaster Tainted: G =3B =3B&nbs=
p=3B =3B =3B =3B =3B W 2.6.27.6 #7<br> =3B[<=3Bc10510=
f9>=3B] oom_kill_process+0x103/0x1d5<br> =3B[<=3Bc11c14cc>=3B] se=
curity_capable+0x9/0xa<br> =3B[<=3Bc1050f0d>=3B] badness+0x118/0x20=
1<br> =3B[<=3Bc10513fc>=3B] out_of_memory+0x231/0x265<br> =3B[&=
lt=3Bc1053300>=3B] __alloc_pages_internal+0x322/0x447<br> =3B[<=3Bc=
106ac5e>=3B] alloc_pages_current+0x59/0x89<br> =3B[<=3Bc1051c2c>=
=3B] __get_free_pages+0xa/0x16<br> =3B[<=3Bc101f815>=3B] copy_proce=
ss+0xa2/0xeaa<br> =3B[<=3Bc1020683>=3B] do_fork+0x66/0x2c3<br> =
=3B[<=3Bc1001a59>=3B] sys_clone+0x32/0x36<br> =3B[<=3Bc100334a>=
=3B] syscall_call+0x7/0xb<br> =3B=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>Mem-Info:<br>Node 0 DMA per-cpu:<br>CP=
U =3B =3B =3B 0: hi: =3B =3B =3B 0=2C btch: =3B=
 =3B 1 usd: =3B =3B 0<br>CPU =3B =3B =3B 1: hi:&nbs=
p=3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B =3B 0<br=
>CPU =3B =3B =3B 2: hi: =3B =3B =3B 0=2C btch: =
=3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B =3B 3: hi:&=
nbsp=3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B =3B 0=
<br>CPU =3B =3B =3B 4: hi: =3B =3B =3B 0=2C btch:&n=
bsp=3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B =3B 5: h=
i: =3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B =
=3B 0<br>CPU =3B =3B =3B 6: hi: =3B =3B =3B 0=2C bt=
ch: =3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B =3B=
7: hi: =3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B&n=
bsp=3B 0<br>CPU =3B =3B =3B 8: hi: =3B =3B =3B 0=2C=
btch: =3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B =
=3B 9: hi: =3B =3B =3B 0=2C btch: =3B =3B 1 usd: =
=3B =3B 0<br>CPU =3B =3B 10: hi: =3B =3B =3B 0=2C b=
tch: =3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B 11: hi=
: =3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B =3B=
0<br>CPU =3B =3B 12: hi: =3B =3B =3B 0=2C btch: =
=3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B 13: hi: =3B=
 =3B =3B 0=2C btch: =3B =3B 1 usd: =3B =3B 0<br>CPU=
 =3B =3B 14: hi: =3B =3B =3B 0=2C btch: =3B =3B=
1 usd: =3B =3B 0<br>CPU =3B =3B 15: hi: =3B =3B&nb=
sp=3B 0=2C btch: =3B =3B 1 usd: =3B =3B 0<br>Node 0 Normal =
per-cpu:<br>CPU =3B =3B =3B 0: hi: =3B 186=2C btch: =3B=
31 usd: =3B =3B 0<br>CPU =3B =3B =3B 1: hi: =3B 18=
6=2C btch: =3B 31 usd: =3B 30<br>CPU =3B =3B =3B 2: hi:=
 =3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =
=3B =3B 3: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B 0<b=
r>CPU =3B =3B =3B 4: hi: =3B 186=2C btch: =3B 31 usd:&n=
bsp=3B =3B 0<br>CPU =3B =3B =3B 5: hi: =3B 186=2C btch:=
 =3B 31 usd: =3B =3B 0<br>CPU =3B =3B =3B 6: hi:&nb=
sp=3B 186=2C btch: =3B 31 usd: =3B 26<br>CPU =3B =3B =
=3B 7: hi: =3B 186=2C btch: =3B 31 usd: =3B 26<br>CPU =3B&n=
bsp=3B =3B 8: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B =
0<br>CPU =3B =3B =3B 9: hi: =3B 186=2C btch: =3B 31 usd=
: =3B =3B 0<br>CPU =3B =3B 10: hi: =3B 186=2C btch:&nbs=
p=3B 31 usd: =3B =3B 0<br>CPU =3B =3B 11: hi: =3B 186=
=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B 12: hi:&=
nbsp=3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =
=3B 13: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU&n=
bsp=3B =3B 14: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B=
0<br>CPU =3B =3B 15: hi: =3B 186=2C btch: =3B 31 usd: =
=3B 25<br>Node 0 HighMem per-cpu:<br>CPU =3B =3B =3B 0: hi:&nbs=
p=3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B&=
nbsp=3B 1: hi: =3B 186=2C btch: =3B 31 usd: =3B 30<br>CPU =
=3B =3B =3B 2: hi: =3B 186=2C btch: =3B 31 usd: =3B&nbs=
p=3B 0<br>CPU =3B =3B =3B 3: hi: =3B 186=2C btch: =3B 3=
1 usd: =3B =3B 0<br>CPU =3B =3B =3B 4: hi: =3B 186=
=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B =3B =
5: hi: =3B 186=2C btch: =3B 31 usd: 167<br>CPU =3B =3B =
=3B 6: hi: =3B 186=2C btch: =3B 31 usd: =3B 25<br>CPU =3B&n=
bsp=3B =3B 7: hi: =3B 186=2C btch: =3B 31 usd: =3B 19<br>CP=
U =3B =3B =3B 8: hi: =3B 186=2C btch: =3B 31 usd: =
=3B =3B 0<br>CPU =3B =3B =3B 9: hi: =3B 186=2C btch:&nb=
sp=3B 31 usd: =3B =3B 0<br>CPU =3B =3B 10: hi: =3B 186=
=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B 11: hi:&=
nbsp=3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =
=3B 12: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU&n=
bsp=3B =3B 13: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B=
0<br>CPU =3B =3B 14: hi: =3B 186=2C btch: =3B 31 usd: =
=3B =3B 0<br>CPU =3B =3B 15: hi: =3B 186=2C btch: =3B 3=
1 usd: =3B 23<br>Active:1573667 inactive:609150 dirty:46 writeback:107 =
unstable:0<br> =3Bfree:1750894 slab:31196 mapped:538832 pagetables:1433=
59 bounce:0<br>Node 0 DMA free:3540kB min:64kB low:80kB high:96kB active:0k=
B inactive:0kB prese =3B =3B =3B =3B =3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B nt:15836kB pages_scanned:0 all_unreclaimab=
le? no<br>lowmem_reserve[]: 0 873 16095 16095<br>Node 0 Normal free:28132kB=
min:3744kB low:4680kB high:5616kB active:840kB inacti =3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B ve:892kB p=
resent:894080kB pages_scanned:0 all_unreclaimable? no<br>lowmem_reserve[]: =
0 0 121778 121778<br>Node 0 HighMem free:6971904kB min:512kB low:16836kB hi=
gh:33160kB active:6293828k =3B =3B =3B =3B =3B  =3B&=
nbsp=3B =3B =3B =3B =3B =3B =3B  =3B =3B&nbs=
p=3B =3B =3B =3B =3B =3B =3B =3B  =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B B inactive:2435708kB present:15587608=
kB pages_scanned:0 all_unreclaimable? no<br>lowmem_reserve[]: 0 0 0 0<br>No=
de 0 DMA: 113*4kB 11*8kB 1*16kB 1*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*102=
4kB =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B 1*2048kB 0*4096kB =3D 3660kB<br>Node 0 Normal: 6429*4=
kB 147*8kB 9*16kB 2*32kB 2*64kB 1*128kB 0*256kB 1*512kB 1*1 =3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B 024kB=
0*2048kB 0*4096kB =3D 28892kB<br>Node 0 HighMem: 690211*4kB 364384*8kB 729=
02*16kB 3650*32kB 17*64kB 50*128kB 5*25 =3B =3B =3B =3B&nbs=
p=3B =3B =3B =3B =3B =3B =3B =3B  =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B 6kB 2*512kB 1*1024kB 0*=
2048kB 1*4096kB =3D 6974060kB<br>1920296 total pagecache pages<br>0 pages i=
n swap cache<br>Swap cache stats: add 913280=2C delete 913280=2C find 20738=
7/229468<br>Free swap =3B =3D 1754452kB<br>Total swap =3D 3904552kB<br>=
4390911 pages RAM<br>4161535 pages HighMem<br>268987 pages reserved<br>6066=
507 pages shared<br>1384540 pages non-shared<br>Out of memory: kill process=
13279 (postmaster) score 546058 or a child<br>Killed process 13279 (postma=
ster)<br><br><br>This is the output of free -m before and after the kill <b=
r><br>free -m<br> =3B =3B =3B =3B =3B =3B =3B&n=
bsp=3B =3B =3B =3B =3B total =3B =3B =3B =
=3B =3B =3B used =3B =3B =3B =3B =3B =3B fr=
ee =3B =3B =3B =3B shared =3B =3B =3B buffers&n=
bsp=3B =3B =3B =3B cached<br>Mem: =3B =3B =3B =
=3B =3B =3B =3B =3B 16101 =3B =3B =3B =3B&n=
bsp=3B =3B 9302 =3B =3B =3B =3B =3B =3B 6799&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B 0&nbs=
p=3B =3B =3B =3B =3B =3B =3B =3B  =3B 3 =
=3B =3B =3B =3B =3B =3B 7521<br>-/+ buffers/cache: =
=3B =3B =3B =3B =3B =3B 1776 =3B =3B =3B&nb=
sp=3B =3B 14324<br>Swap: =3B =3B =3B =3B =3B =
=3B =3B =3B 3813 =3B =3B =3B =3B =3B =3B 20=
99 =3B =3B =3B =3B =3B =3B 1713<br><br><br>free -m<=
br> =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B total =3B =3B =3B =3B =3B =
=3B used =3B =3B =3B =3B =3B =3B free =3B =
=3B =3B =3B shared =3B =3B =3B buffers =3B =3B&=
nbsp=3B =3B cached<br>Mem: =3B =3B =3B =3B =3B =
=3B =3B =3B 16101 =3B =3B =3B =3B =3B =3B 5=
606 =3B =3B =3B =3B =3B 10494 =3B =3B =3B&n=
bsp=3B =3B =3B =3B =3B =3B 0 =3B =3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B 7 =3B =3B =3B&nbs=
p=3B =3B =3B 5410<br>-/+ buffers/cache: =3B =3B =3B&nbs=
p=3B =3B =3B =3B 188 =3B =3B =3B =3B =3B 15=
912<br> Swap: =3B =3B =3B =3B =3B =3B =3 B =
=3B 3813 =3B =3B =3B =3B =3B =3B 2099 =3B =
=3B =3B =3B =3B =3B 1713<br><br><br>the sysctl.conf =3B=
with<br>kernel.shmmax =3D 10737418240<br>vm.overcommit_memory =3D 2<br><br=
>I do not what why the oom-killer kill the postgres if there are available =
memory.<br><br>I would appreciate any help<br><br>Regars...<br>
<hr />=
No olvides consultar tus correos desde <a href=3D'www.messengernews.com.mx=
' target=3D'_new'>la ventana principal de Messenger</a></body>
</html>=

--_e372b9b8-3540-4f1a-b0d1-35043e62140f_--
fabrixio1 [ Do, 12 März 2009 19:17 ] [ ID #1992985 ]

Re: out of memory

--0015174be2702b6ab10464f25080
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

On Thu, Mar 12, 2009 at 9:17 PM, Fabricio <fabrixio1 [at] hotmail.com> wrote:

>
> Hi
>
> I have a dedicated database server with 16 GB of RAM.
>
> and the oom-killer is killing my database
>

What kernel and architecture are you running? Show your `uname -a` please.



--
Vladimir Rusinov
http://greenmice.info/

--0015174be2702b6ab10464f25080
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Thu, Mar 12, 2009 at 9:17 PM, Fabrici=
o <span dir=3D"ltr"><<a href=3D"mailto:fabrixio1 [at] hotmail.com">fabrixio1 [at] =
hotmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" styl=
e=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; =
padding-left: 1ex;">




<div>
<br>Hi<br><br>I have a dedicated database server with 16 GB of RAM.<br><br>=
and the oom-killer is killing my database</div></blockquote><div><br>What k=
ernel and architecture are you running? Show your `uname -a` please.<br>
</div></div><br><br clear=3D"all"><br>-- <br>Vladimir Rusinov<br><a href=3D=
"http://greenmice.info/">http://greenmice.info/</a><br>

--0015174be2702b6ab10464f25080--
Vladimir Rusinov [ Do, 12 März 2009 22:03 ] [ ID #1992986 ]

Re: out of memory

--_a7d58399-aa62-4924-b1db-0d290f0320ef_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable




Hello...



Linux 2.6.27.6 #7 SMP Sun Nov 16 00:48:35 MST 2008 i686 i686 i386 GNU/Linux

Slackware 11 and Postgres 8.1.15



thanks...



Date: Fri=2C 13 Mar 2009 00:03:16 +0300
Subject: Re: [ADMIN] out of memory
From: vladimir [at] greenmice.info
To: fabrixio1 [at] hotmail.com
CC: pgsql-admin [at] postgresql.org




On Thu=2C Mar 12=2C 2009 at 9:17 PM=2C Fabricio <fabrixio1 [at] hotmail.com> wro=
te:



Hi

I have a dedicated database server with 16 GB of RAM.

and the oom-killer is killing my database

What kernel and architecture are you running? Show your `uname -a` please.


--
Vladimir Rusinov
http://greenmice.info/

____________________________________________________________ _____
=BFConoces todas las novedades de Messenger?
www.messengernews.com.mx=

--_a7d58399-aa62-4924-b1db-0d290f0320ef_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
</style>
</head>
<body class=3D'hmmessage'>
 =3B<BR>
Hello...<BR>
 =3B<BR>
Linux =3B2.6.27.6 #7 SMP Sun Nov 16 00:48:35 MST 2008 i686 i686 i386 GN=
U/Linux<BR>
Slackware 11 and Postgres 8.1.15<BR>
 =3B<BR>
thanks...<BR><BR>
<HR id=3DstopSpelling>
Date: Fri=2C 13 Mar 2009 00:03:16 +0300<BR>Subject: Re: [ADMIN] out of memo=
ry<BR>From: vladimir [at] greenmice.info<BR>To: fabrixio1 [at] hotmail.com<BR>CC: pgs=
ql-admin [at] postgresql.org<BR><BR><BR><BR>
<DIV class=3DEC_gmail_quote>On Thu=2C Mar 12=2C 2009 at 9:17 PM=2C Fabricio=
<SPAN dir=3Dltr><=3B<A href=3D"mailto:fabrixio1 [at] hotmail.com">fabrixio1 [at] h=
otmail.com</A>>=3B</SPAN> wrote:<BR>
<BLOCKQUOTE class=3DEC_gmail_quote style=3D"PADDING-LEFT: 1ex">
<DIV><BR>Hi<BR><BR>I have a dedicated database server with 16 GB of RAM.<BR=
><BR>and the oom-killer is killing my database</DIV></BLOCKQUOTE>
<DIV><BR>What kernel and architecture are you running? Show your `uname -a`=
please.<BR></DIV></DIV><BR><BR clear=3Dall><BR>-- <BR>Vladimir Rusinov<BR>=
<A href=3D"http://greenmice.info/">http://greenmice.info/</A><BR>
<hr =
/>Personaliza=2C comparte y comun=EDcate <a href=3D'www.messengernews.com.=
mx' target=3D'_new'>como nunca antes en Messenger</a></body>
</html>=

--_a7d58399-aa62-4924-b1db-0d290f0320ef_--
fabrixio1 [ Fr, 13 März 2009 21:15 ] [ ID #1993447 ]

Re: out of memory

--_eacc32fa-2c63-44b0-bcf7-71d60c5fbb68_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



Hi

there's no comments?

Fabricio

From: fabrixio1 [at] hotmail.com
To: pgsql-admin [at] postgresql.org
Subject: [ADMIN] out of memory
Date: Thu=2C 12 Mar 2009 11:17:52 -0700









Hi

I have a dedicated database server with 16 GB of RAM.
Linux 2.6.27.6 #7 SMP Sun Nov 16 00:48:35 MST 2008 i686 i686 i386 GNU/Linux

Slackware 11 and Postgres 8.1.15

and the oom-killer is killing my database

this is the output kernel:

postmaster invoked oom-killer: gfp_mask=3D0xd0=2C order=3D1=2C oomkilladj=
=3D0
Pid: 16667=2C comm: postmaster Tainted: G W 2.6.27.6 #7
[<c10510f9>] oom_kill_process+0x103/0x1d5
[<c11c14cc>] security_capable+0x9/0xa
[<c1050f0d>] badness+0x118/0x201
[<c10513fc>] out_of_memory+0x231/0x265
[<c1053300>] __alloc_pages_internal+0x322/0x447
[<c106ac5e>] alloc_pages_current+0x59/0x89
[<c1051c2c>] __get_free_pages+0xa/0x16
[<c101f815>] copy_process+0xa2/0xeaa
[<c1020683>] do_fork+0x66/0x2c3
[<c1001a59>] sys_clone+0x32/0x36
[<c100334a>] syscall_call+0x7/0xb
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D
Mem-Info:
Node 0 DMA per-cpu:
CPU 0: hi: 0=2C btch: 1 usd: 0
CPU 1: hi: 0=2C btch: 1 usd: 0
CPU 2: hi: 0=2C btch: 1 usd: 0
CPU 3: hi: 0=2C btch: 1 usd: 0
CPU 4: hi: 0=2C btch: 1 usd: 0
CPU 5: hi: 0=2C btch: 1 usd: 0
CPU 6: hi: 0=2C btch: 1 usd: 0
CPU 7: hi: 0=2C btch: 1 usd: 0
CPU 8: hi: 0=2C btch: 1 usd: 0
CPU 9: hi: 0=2C btch: 1 usd: 0
CPU 10: hi: 0=2C btch: 1 usd: 0
CPU 11: hi: 0=2C btch: 1 usd: 0
CPU 12: hi: 0=2C btch: 1 usd: 0
CPU 13: hi: 0=2C btch: 1 usd: 0
CPU 14: hi: 0=2C btch: 1 usd: 0
CPU 15: hi: 0=2C btch: 1 usd: 0
Node 0 Normal per-cpu:
CPU 0: hi: 186=2C btch: 31 usd: 0
CPU 1: hi: 186=2C btch: 31 usd: 30
CPU 2: hi: 186=2C btch: 31 usd: 0
CPU 3: hi: 186=2C btch: 31 usd: 0
CPU 4: hi: 186=2C btch: 31 usd: 0
CPU 5: hi: 186=2C btch: 31 usd: 0
CPU 6: hi: 186=2C btch: 31 usd: 26
CPU 7: hi: 186=2C btch: 31 usd: 26
CPU 8: hi: 186=2C btch: 31 usd: 0
CPU 9: hi: 186=2C btch: 31 usd: 0
CPU 10: hi: 186=2C btch: 31 usd: 0
CPU 11: hi: 186=2C btch: 31 usd: 0
CPU 12: hi: 186=2C btch: 31 usd: 0
CPU 13: hi: 186=2C btch: 31 usd: 0
CPU 14: hi: 186=2C btch: 31 usd: 0
CPU 15: hi: 186=2C btch: 31 usd: 25
Node 0 HighMem per-cpu:
CPU 0: hi: 186=2C btch: 31 usd: 0
CPU 1: hi: 186=2C btch: 31 usd: 30
CPU 2: hi: 186=2C btch: 31 usd: 0
CPU 3: hi: 186=2C btch: 31 usd: 0
CPU 4: hi: 186=2C btch: 31 usd: 0
CPU 5: hi: 186=2C btch: 31 usd: 167
CPU 6: hi: 186=2C btch: 31 usd: 25
CPU 7: hi: 186=2C btch: 31 usd: 19
CPU 8: hi: 186=2C btch: 31 usd: 0
CPU 9: hi: 186=2C btch: 31 usd: 0
CPU 10: hi: 186=2C btch: 31 usd: 0
CPU 11: hi: 186=2C btch: 31 usd: 0
CPU 12: hi: 186=2C btch: 31 usd: 0
CPU 13: hi: 186=2C btch: 31 usd: 0
CPU 14: hi: 186=2C btch: 31 usd: 0
CPU 15: hi: 186=2C btch: 31 usd: 23
Active:1573667 inactive:609150 dirty:46 writeback:107 unstable:0
free:1750894 slab:31196 mapped:538832 pagetables:143359 bounce:0
Node 0 DMA free:3540kB min:64kB low:80kB high:96kB active:0kB inactive:0kB =
prese =
nt:15836kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 873 16095 16095
Node 0 Normal free:28132kB min:3744kB low:4680kB high:5616kB active:840kB i=
nacti =
ve:892kB present:894080kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 121778 121778
Node 0 HighMem free:6971904kB min:512kB low:16836kB high:33160kB active:629=
3828k =
B inactive:2435708kB present:15587608kB pages_scanned:0 all_unreclai=
mable? no
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 113*4kB 11*8kB 1*16kB 1*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1=
024kB =
1*2048kB 0*4096kB =3D 3660kB
Node 0 Normal: 6429*4kB 147*8kB 9*16kB 2*32kB 2*64kB 1*128kB 0*256kB 1*512k=
B 1*1 =
024kB 0*2048kB 0*4096kB =3D 28892kB
Node 0 HighMem: 690211*4kB 364384*8kB 72902*16kB 3650*32kB 17*64kB 50*128kB=
5*25 =
6kB 2*512kB 1*1024kB 0*2048kB 1*4096kB =3D 6974060kB
1920296 total pagecache pages
0 pages in swap cache
Swap cache stats: add 913280=2C delete 913280=2C find 207387/229468
Free swap =3D 1754452kB
Total swap =3D 3904552kB
4390911 pages RAM
4161535 pages HighMem
268987 pages reserved
6066507 pages shared
1384540 pages non-shared
Out of memory: kill process 13279 (postmaster) score 546058 or a child
Killed process 13279 (postmaster)


This is the output of free -m before and after the kill

free -m
total used free shared buffers cached
Mem: 16101 9302 6799 0 3 7521
-/+ buffers/cache: 1776 14324
Swap: 3813 2099 1713


free -m
total used free shared buffers cached
Mem: 16101 5606 10494 0 7 5410
-/+ buffers/cache: 188 15912
Swap: 3813 2099 1713


the sysctl.conf with
kernel.shmmax =3D 10737418240
vm.overcommit_memory =3D 2

I do not what why the oom-killer kill the postgres if there are available m=
emory.

I would appreciate any help

Regars...

No olvides consultar tus correos desde la ventana principal de Messenger
____________________________________________________________ _____
=BFQu=E9 hay de nuevo con tus contactos de Messenger?
www.messengernews.com.mx=

--_eacc32fa-2c63-44b0-bcf7-71d60c5fbb68_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
</style>
</head>
<body class=3D'hmmessage'>
<br>Hi<br><br>there's no comments?<br><br>Fabricio<br><br><hr id=3D"stopSpe=
lling">From: fabrixio1 [at] hotmail.com<br>To: pgsql-admin [at] postgresql.org<br>Sub=
ject: [ADMIN] out of memory<br>Date: Thu=2C 12 Mar 2009 11:17:52 -0700<br><=
br>



<style>
..ExternalClass .EC_hmmessage P
{padding:0px=3B}
..ExternalClass body.EC_hmmessage
{font-size:10pt=3Bfont-family:Verdana=3B}
</style>


<br>Hi<br><br>I have a dedicated database server with 16 GB of RAM.<br>Linu=
x =3B2.6.27.6 #7 SMP Sun Nov 16 00:48:35 MST 2008 i686 i686 i386 GNU/Li=
nux<br>
Slackware 11 and Postgres 8.1.15<br><br>and the oom-killer is killing my da=
tabase<br><br>this is the output kernel:<br><br>postmaster invoked oom-kill=
er: gfp_mask=3D0xd0=2C order=3D1=2C oomkilladj=3D0<br>Pid: 16667=2C comm: p=
ostmaster Tainted: G =3B =3B =3B =3B =3B =3B =
=3B W 2.6.27.6 #7<br> =3B[<=3Bc10510f9>=3B] oom_kill_process+0x103/=
0x1d5<br> =3B[<=3Bc11c14cc>=3B] security_capable+0x9/0xa<br> =
=3B[<=3Bc1050f0d>=3B] badness+0x118/0x201<br> =3B[<=3Bc10513fc>=
=3B] out_of_memory+0x231/0x265<br> =3B[<=3Bc1053300>=3B] __alloc_pa=
ges_internal+0x322/0x447<br> =3B[<=3Bc106ac5e>=3B] alloc_pages_curr=
ent+0x59/0x89<br> =3B[<=3Bc1051c2c>=3B] __get_free_pages+0xa/0x16<b=
r> =3B[<=3Bc101f815>=3B] copy_process+0xa2/0xeaa<br> =3B[<=3B=
c1020683>=3B] do_fork+0x66/0x2c3<br> =3B[<=3Bc1001a59>=3B] sys_cl=
one+0x32/0x36<br> =3B[<=3Bc100334a>=3B] syscall_call+0x7/0xb<br>&nb=
sp=3B=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= 3D=3D=3D=3D=3D<=
br>Mem-Info:<br>Node 0 DMA per-cpu:<br>CPU =3B =3B =3B 0: hi:&n=
bsp=3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B =3B 0<=
br>CPU =3B =3B =3B 1: hi: =3B =3B =3B 0=2C btch:&nb=
sp=3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B =3B 2: hi=
: =3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B =3B=
0<br>CPU =3B =3B =3B 3: hi: =3B =3B =3B 0=2C btch:=
 =3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B =3B 4:=
hi: =3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B =
=3B 0<br>CPU =3B =3B =3B 5: hi: =3B =3B =3B 0=2C bt=
ch: =3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B =3B=
6: hi: =3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B&n=
bsp=3B 0<br>CPU =3B =3B =3B 7: hi: =3B =3B =3B 0=2C=
btch: =3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B =
=3B 8: hi: =3B =3B =3B 0=2C btch: =3B =3B 1 usd: =
=3B =3B 0<br>CPU =3B =3B =3B 9: hi: =3B =3B =3B=
0=2C btch: =3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B=
10: hi: =3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B&=
nbsp=3B 0<br>CPU =3B =3B 11: hi: =3B =3B =3B 0=2C btch:=
 =3B =3B 1 usd: =3B =3B 0<br>CPU =3B =3B 12: hi:&nb=
sp=3B =3B =3B 0=2C btch: =3B =3B 1 usd: =3B =3B 0<b=
r>CPU =3B =3B 13: hi: =3B =3B =3B 0=2C btch: =3B&nb=
sp=3B 1 usd: =3B =3B 0<br>CPU =3B =3B 14: hi: =3B =
=3B =3B 0=2C btch: =3B =3B 1 usd: =3B =3B 0<br>CPU =
=3B =3B 15: hi: =3B =3B =3B 0=2C btch: =3B =3B 1 us=
d: =3B =3B 0<br>Node 0 Normal per-cpu:<br>CPU =3B =3B =
=3B 0: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU&nb=
sp=3B =3B =3B 1: hi: =3B 186=2C btch: =3B 31 usd: =3B 3=
0<br>CPU =3B =3B =3B 2: hi: =3B 186=2C btch: =3B 31 usd=
: =3B =3B 0<br>CPU =3B =3B =3B 3: hi: =3B 186=2C bt=
ch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B =3B 4: hi:=
 =3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =
=3B =3B 5: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B 0<b=
r>CPU =3B =3B =3B 6: hi: =3B 186=2C btch: =3B 31 usd:&n=
bsp=3B 26<br>CPU =3B =3B =3B 7: hi: =3B 186=2C btch: =
=3B 31 usd: =3B 26<br>CPU =3B =3B =3B 8: hi: =3B 186=2C=
btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B =3B 9: =
hi: =3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B&n=
bsp=3B 10: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CP=
U =3B =3B 11: hi: =3B 186=2C btch: =3B 31 usd: =3B =
=3B 0<br>CPU =3B =3B 12: hi: =3B 186=2C btch: =3B 31 usd:&n=
bsp=3B =3B 0<br>CPU =3B =3B 13: hi: =3B 186=2C btch: =
=3B 31 usd: =3B =3B 0<br>CPU =3B =3B 14: hi: =3B 186=2C=
btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B 15: hi:&nbs=
p=3B 186=2C btch: =3B 31 usd: =3B 25<br>Node 0 HighMem per-cpu:<br>=
CPU =3B =3B =3B 0: hi: =3B 186=2C btch: =3B 31 usd:&nbs=
p=3B =3B 0<br>CPU =3B =3B =3B 1: hi: =3B 186=2C btch:&n=
bsp=3B 31 usd: =3B 30<br>CPU =3B =3B =3B 2: hi: =3B 186=
=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B =3B =
3: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =
=3B =3B =3B 4: hi: =3B 186=2C btch: =3B 31 usd: =3B&nbs=
p=3B 0<br>CPU =3B =3B =3B 5: hi: =3B 186=2C btch: =3B 3=
1 usd: 167<br>CPU =3B =3B =3B 6: hi: =3B 186=2C btch: =
=3B 31 usd: =3B 25<br>CPU =3B =3B =3B 7: hi: =3B 186=2C=
btch: =3B 31 usd: =3B 19<br>CPU =3B =3B =3B 8: hi:&nbs=
p=3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B&=
nbsp=3B 9: hi: =3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CP=
U =3B =3B 10: hi: =3B 186=2C btch: =3B 31 usd: =3B =
=3B 0<br>CPU =3B =3B 11: hi: =3B 186=2C btch: =3B 31 usd:&n=
bsp=3B =3B 0<br>CPU =3B =3B 12: hi: =3B 186=2C btch: =
=3B 31 usd: =3B =3B 0<br>CPU =3B =3B 13: hi: =3B 186=2C=
btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B 14: hi:&nbs=
p=3B 186=2C btch: =3B 31 usd: =3B =3B 0<br>CPU =3B =3B =
15: hi: =3B 186=2C btch: =3B 31 usd: =3B 23<br>Active:1573667 i=
nactive:609150 dirty:46 writeback:107 unstable:0<br> =3Bfree:1750894 sl=
ab:31196 mapped:538832 pagetables:143359 bounce:0<br>Node 0 DMA free:3540kB=
min:64kB low:80kB high:96kB active:0kB inactive:0kB prese =3B =3B&=
nbsp=3B =3B =3B =3B =3B =3B =3B  =3B =3B&nbs=
p=3B =3B =3B =3B =3B =3B =3B =3B  =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B nt:15=
836kB pages_scanned:0 all_unreclaimable? no<br>lowmem_reserve[]: 0 873 1609=
5 16095<br>Node 0 Normal free:28132kB min:3744kB low:4680kB high:5616kB act=
ive:840kB inacti =3B =3B =3B =3B =3B =3B = 3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B ve:892kB present:894080kB pages_scanned:0 all_u=
nreclaimable? no<br>lowmem_reserve[]: 0 0 121778 121778<br>Node 0 HighMem f=
ree:6971904kB min:512kB low:16836kB high:33160kB active:6293828k =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
B inactive:2435708kB present:15587608kB pages_scanned:0 all_unreclaimable?=
no<br>lowmem_reserve[]: 0 0 0 0<br>Node 0 DMA: 113*4kB 11*8kB 1*16kB 1*32k=
B 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB =3B =3B =3B =3B&n=
bsp=3B =3B =3B =3B =3B =3B =3B = 3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B 1*2048kB 0*4096=
kB =3D 3660kB<br>Node 0 Normal: 6429*4kB 147*8kB 9*16kB 2*32kB 2*64kB 1*128=
kB 0*256kB 1*512kB 1*1 =3B =3B =3B =3B =3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B 024kB 0*2048kB 0*4096kB =3D 28892kB<br>Nod=
e 0 HighMem: 690211*4kB 364384*8kB 72902*16kB 3650*32kB 17*64kB 50*128kB 5*=
25 =3B =3B =3B =3B =3B =3B =3B&n bsp=3B =3B&=
nbsp=3B =3B =3B =3B =3B =3B =3B  =3B =3B&nbs=
p=3B =3B =3B =3B =3B =3B =3B =3B  =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B 6kB 2*512kB 1*1024kB 0*2048kB 1*4096kB =3D 6974060kB<br>19202=
96 total pagecache pages<br>0 pages in swap cache<br>Swap cache stats: add =
913280=2C delete 913280=2C find 207387/229468<br>Free swap =3B =3D 1754=
452kB<br>Total swap =3D 3904552kB<br>4390911 pages RAM<br>4161535 pages Hig=
hMem<br>268987 pages reserved<br>6066507 pages shared<br>1384540 pages non-=
shared<br>Out of memory: kill process 13279 (postmaster) score 546058 or a =
child<br>Killed process 13279 (postmaster)<br><br><br>This is the output of=
free -m before and after the kill <br><br>free -m<br> =3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
total =3B =3B =3B =3B =3B =3B used =3B =3B=
 =3B =3B =3B =3B free =3B =3B =3B =3B share=
d =3B =3B =3B buffers =3B =3B =3B =3B cached<br=
>Mem: =3B =3B =3B =3B =3B =3B =3 B =3B 16101=
 =3B =3B =3B =3B =3B =3B 9302 =3B =3B =
=3B =3B =3B =3B 6799 =3B =3B =3B =3B =3B&nb=
sp=3B =3B =3B =3B 0 =3B =3B =3B =3B =3B&nbs=
p=3B =3B =3B =3B 3 =3B =3B =3B =3B =3B =
=3B 7521<br>-/+ buffers/cache: =3B =3B =3B =3B =3B =
=3B 1776 =3B =3B =3B =3B =3B 14324<br>Swap: =3B&nbs=
p=3B =3B =3B =3B =3B =3B =3B 3813 =3B =3B&n=
bsp=3B =3B =3B =3B 2099 =3B =3B =3B =3B =3B=
 =3B 1713<br><br><br>free -m<br> =3B =3B =3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B total =3B&n=
bsp=3B =3B =3B =3B =3B used =3B =3B =3B =3B=
 =3B =3B free =3B =3B =3B =3B shared =3B =
=3B =3B buffers =3B =3B =3B =3B cached<br>Mem: =3B&=
nbsp=3B =3B =3B =3B =3B =3B =3B 16101 =3B =
=3B =3B =3B =3B =3B 5606 =3B =3B =3B =3B&nb=
sp=3B 10494 =3B =3B =3B =3B =3B =3B =3 B =3B=
 =3B 0 =3B =3B =3B =3B =3B =3B =3B&nb sp=3B&=
nbsp=3B 7 =3B =3B =3B =3B =3B =3B 5410<br>-/+ buffe=
rs/cache: =3B =3B =3B =3B =3B =3B&nb sp=3B 188 =
=3B =3B =3B =3B =3B 15912<br>Swap: =3B =3B =3B&=
nbsp=3B =3B =3B =3B =3B 3813 =3B =3B =3B =
=3B =3B =3B 2099 =3B =3B =3B =3B =3B =3B 17=
13<br><br><br>the sysctl.conf =3B with<br>kernel.shmmax =3D 10737418240=
<br>vm.overcommit_memory =3D 2<br><br>I do not what why the oom-killer kill=
the postgres if there are available memory.<br><br>I would appreciate any =
help<br><br>Regars...<br><br><hr>No olvides consultar tus correos desde <a=
href=3D"http://www.messengernews.com.mx">la ventana principal de Messenger=
</a>
<hr />Si eres de los que usa Messenger no solo para chatear. <a h=
ref=3D'www.messengernews.com.mx' target=3D'_new'>esto te va a interesar</a>=
</body>
</html>=

--_eacc32fa-2c63-44b0-bcf7-71d60c5fbb68_--
fabrixio1 [ Mi, 18 März 2009 23:20 ] [ ID #1994114 ]

Re: out of memory

Fabricio wrote:
>
>
> Hi
>
> I have a dedicated database server with 16 GB of RAM.
>
> and the oom-killer is killing my database

Try disabling memory overcommit; see 17.4.3 here:
http://www.postgresql.org/docs/8.3/interactive/kernel-resour ces.html

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Alvaro Herrera [ Do, 19 März 2009 01:28 ] [ ID #1994242 ]

Re: out of memory

--0016363b9f2462df9e04657d12da
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

On Fri, Mar 13, 2009 at 11:15 PM, Fabricio <fabrixio1 [at] hotmail.com> wrote:

>
> Hello...
>
> Linux 2.6.27.6 #7 SMP Sun Nov 16 00:48:35 MST 2008 i686 i686 i386 GNU/Linux
> Slackware 11 and Postgres 8.1.15
>


Go download 64-bit OS.

--
Vladimir Rusinov
http://greenmice.info/

--0016363b9f2462df9e04657d12da
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Fri, Mar 13, 2009 at 11:15 PM, Fabric=
io <span dir=3D"ltr"><<a href=3D"mailto:fabrixio1 [at] hotmail.com">fabrixio1=
[at] hotmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" sty=
le=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex;=
padding-left: 1ex;">




<div>
=C2=A0<br>
Hello...<br>
=C2=A0<br>
Linux=C2=A02.6.27.6 #7 SMP Sun Nov 16 00:48:35 MST 2008 i686 i686 i386 GNU/=
Linux<br>
Slackware 11 and Postgres 8.1.15</div></blockquote><div><br><br>Go download=
64-bit OS.<br></div></div><br>-- <br>Vladimir Rusinov<br><a href=3D"http:/=
/greenmice.info/">http://greenmice.info/</a><br>

--0016363b9f2462df9e04657d12da--
Vladimir Rusinov [ Do, 19 März 2009 19:36 ] [ ID #1994245 ]

Re: out of memory

--_bd46865c-0556-419a-9b74-390e9ece4d44_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



Thanks for answer Alvaro

Already i have memory overcommit disabled.
I've always had with the value 2

vm.overcommit_memory =3D 2

Fabricio

> Date: Wed=2C 18 Mar 2009 20:28:02 -0400
> From: alvherre [at] commandprompt.com
> To: fabrixio1 [at] hotmail.com
> CC: pgsql-admin [at] postgresql.org
> Subject: Re: [ADMIN] out of memory
>
> Fabricio wrote:
> >
> >
> > Hi
> >
> > I have a dedicated database server with 16 GB of RAM.
> >
> > and the oom-killer is killing my database
>
> Try disabling memory overcommit=3B see 17.4.3 here:
> http://www.postgresql.org/docs/8.3/interactive/kernel-resour ces.html
>
> --
> Alvaro Herrera http://www.CommandPrompt.co=
m/
> The PostgreSQL Company - Command Prompt=2C Inc.

____________________________________________________________ _____
=BFConoces todas las novedades de Messenger?
www.messengernews.com.mx=

--_bd46865c-0556-419a-9b74-390e9ece4d44_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
</style>
</head>
<body class=3D'hmmessage'>
<br>Thanks for answer Alvaro<br> =3B<br>Already i have memory overcommi=
t disabled.<br>I've always had with the value 2<br><br>vm.overcommit_memory=
=3D 2<br><br>Fabricio<br><br>>=3B Date: Wed=2C 18 Mar 2009 20:28:02 -040=
0<br>>=3B From: alvherre [at] commandprompt.com<br>>=3B To: fabrixio1 [at] hotmai=
l.com<br>>=3B CC: pgsql-admin [at] postgresql.org<br>>=3B Subject: Re: [ADMI=
N] out of memory<br>>=3B <br>>=3B Fabricio wrote:<br>>=3B >=3B <br>=
>=3B >=3B <br>>=3B >=3B Hi<br>>=3B >=3B <br>>=3B >=3B I hav=
e a dedicated database server with 16 GB of RAM.<br>>=3B >=3B <br>>=
=3B >=3B and the oom-killer is killing my database<br>>=3B <br>>=3B T=
ry disabling memory overcommit=3B see 17.4.3 here:<br>>=3B http://www.pos=
tgresql.org/docs/8.3/interactive/kernel-resources.html<br>>=3B <br>>=3B=
-- <br>>=3B Alvaro Herrera http://www.Com=
mandPrompt.com/<br>>=3B The PostgreSQL Company - Command Prompt=2C Inc.<b=
r>
<hr />Personaliza=2C comparte y comun=EDcate <a href=3D'www.messen=
gernews.com.mx' target=3D'_new'>como nunca antes en Messenger</a></body>
</html>=

--_bd46865c-0556-419a-9b74-390e9ece4d44_--
fabrixio1 [ Fr, 20 März 2009 17:15 ] [ ID #1994390 ]

Re: out of memory

--_9389b2ea-a5c3-4274-aa32-1cabfff8ca07_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable




Hi

Some one know why this is happening?

I change the OS to 64 bits and now the oom-killer not hapend but Postgres i=
s still showing out of memory

Linux SERVER 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_6=
4 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 5.2 (Tikanga)
PostgreSQL 8.1.15
32GB RAM

My postgresql.conf:
# - Memory -

shared_buffers =3D 1048576 # min 16 or max_connectio=
ns*2=2C 8KB each
temp_buffers =3D 1024 # min 100=2C 8KB each
max_prepared_transactions =3D 20 # can be 0 or more
# note: increasing max_prepared_transactions costs ~600 bytes of shared mem=
ory
# per transaction slot=2C plus lock space (see max_locks_per_transaction).
work_mem =3D 1024 # min 64=2C size in KB
maintenance_work_mem =3D 65536 # min 1024=2C size in KB
max_stack_depth =3D 2048 # min 100=2C size in KB



kernel messages:
Jul 31 11:50:08 SERVER kernel: postmaster[7686]: segfault at 00007fff3feb1b=
b0 rip 00002b2f7e17e1a8 rsp 00007fff3feb1b90 error 6
Jul 31 15:41:55 SERVER kernel: postmaster[4737]: segfault at 00007fff3feb1b=
b0 rip 00002b2f7e1851a8 rsp 00007fff3feb1b90 error 6

PostgreSQL log:
<2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for con=
nection: Cannot allocate memory
<2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for con=
nection: Cannot allocate memory
<2009-07-31 15:41:55 MDT 10.27.41.74(2606) aforeglobal sysaforeglobal 7423 =
startup> FATAL: out of memory
<2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for con=
nection: Cannot allocate memory
<2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for con=
nection: Cannot allocate memory
<2009-07-31 15:41:55 MDT 10.27.36.219(3859) db user 7424 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.20.216.82(1966) db user 7431 startup> FATAL: o=
ut of memory
TopMemoryContext: 164432 total in 6 blocks=3B 5368 free (1 chunks)=3B 15906=
4 used
MdSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B 0 used
LockTable (locallock hash): 8192 total in 1 blocks=3B 3744 free (0 chunks)=
=3B 4448 used
Timezones: 52560 total in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used
ErrorContext: 8192 total in 1 blocks=3B 8160 free (4 chunks)=3B 32 used
<2009-07-31 15:41:55 MDT 10.33.128.38(4458) db user 7434 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4458) db user 7434 startup> DETAIL: =
Failed on request of size 24000.
TopMemoryContext: 164432 total in 6 blocks=3B 5368 free (1 chunks)=3B 15906=
4 used
MdSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B 0 used
LockTable (locallock hash): 8192 total in 1 blocks=3B 3744 free (0 chunks)=
=3B 4448 used
Timezones: 52560 total in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used
ErrorContext: 8192 total in 1 blocks=3B 8160 free (4 chunks)=3B 32 used
<2009-07-31 15:41:55 MDT 10.33.128.38(4459) db user 7435 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4459) db user 7435 startup> DETAIL: =
Failed on request of size 24000.
TopMemoryContext: 164432 total in 6 blocks=3B 5368 free (1 chunks)=3B 15906=
4 used
MdSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B 0 used
LockTable (locallock hash): 8192 total in 1 blocks=3B 3744 free (0 chunks)=
=3B 4448 used
Timezones: 52560 total in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used
ErrorContext: 8192 total in 1 blocks=3B 8160 free (4 chunks)=3B 32 used
<2009-07-31 15:41:55 MDT 10.33.128.38(4460) db user 7436 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4460) db user 7436 startup> DETAIL: =
Failed on request of size 24000.
<2009-07-31 15:41:55 MDT 10.33.128.38(4461) db user 7438 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4462) db user 7439 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4463) db user 7440 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.20.219.194(3594) db user 7433 startup> FATAL: =
out of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4464) db user 7441 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4465) db user 7442 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.31(1263) db user 7447 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.44.5.43(3498) db user 7450 startup> FATAL: out=
of memory
<2009-07-31 15:41:55 MDT 10.27.36.219(3860) db user 7448 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.10(35976) db user 7460 idle> LOG: unexp=
ected EOF on client connection
<2009-07-31 15:41:55 MDT 7253 > LOG: server process (PID 4737) was term=
inated by signal 11
<2009-07-31 15:41:55 MDT 7253 > LOG: terminating any other active serve=
r processes
<2009-07-31
15:41:55 MDT 10.33.128.10(35976) db user 7460 idle> WARNING:
terminating connection because of crash of another server process


Before crash:

date & free -m
Fri Jul 31 15:40:01 MDT 2009
15:40:01 up 4:48=2C 3 users=2C load average: 2.64=2C 3.04=2C 3.58

total used free shared buffers cached
Mem: 32187 22292 9895 0 164 19824
-/+ buffers/cache: 2303 29884
Swap: 1983 0 1983

After crash:

date & free -m
Fri Jul 31 15:45:01 MDT 2009
15:45:01 up 4:53=2C 3 users=2C load average: 4.45=2C 3.99=2C 3.80

total used free shared buffers cached
Mem: 32187 14726 17460 0 165 13850
-/+ buffers/cache: 710 31477
Swap: 1983 0 1983

thanks in advance
greetings








From: fabrixio1 [at] hotmail.com
To: alvherre [at] commandprompt.com
CC: pgsql-admin [at] postgresql.org
Subject: Re: [ADMIN] out of memory
Date: Fri=2C 20 Mar 2009 09:15:05 -0700









Thanks for answer Alvaro

Already i have memory overcommit disabled.
I've always had with the value 2

vm.overcommit_memory =3D 2

Fabricio

> Date: Wed=2C 18 Mar 2009 20:28:02 -0400
> From: alvherre [at] commandprompt.com
> To: fabrixio1 [at] hotmail.com
> CC: pgsql-admin [at] postgresql.org
> Subject: Re: [ADMIN] out of memory
>
> Fabricio wrote:
> >
> >
> > Hi
> >
> > I have a dedicated database server with 16 GB of RAM.
> >
> > and the oom-killer is killing my database
>
> Try disabling memory overcommit=3B see 17.4.3 here:
> http://www.postgresql.org/docs/8.3/interactive/kernel-resour ces.html
>
> --
> Alvaro Herrera http://www.CommandPrompt.co=
m/
> The PostgreSQL Company - Command Prompt=2C Inc.


Date: Thu=2C 19 Mar 2009 21:36:00 +0300
Subject: Re: [ADMIN] out of memory
From: vladimir [at] greenmice.info
To: fabrixio1 [at] hotmail.com
CC: pgsql-admin [at] postgresql.org



On Fri=2C Mar 13=2C 2009 at 11:15 PM=2C Fabricio <fabrixio1 [at] hotmail.com> wr=
ote:








Hello...



Linux 2.6.27.6 #7 SMP Sun Nov 16 00:48:35 MST 2008 i686 i686 i386 GNU/Linux

Slackware 11 and Postgres 8.1.15

Go download 64-bit OS.

--
Vladimir Rusinov
http://greenmice.info/

____________________________________________________________ _____
Messenger cumple 10 a=F1os y tiene regalos para ti
www.aniversariomessenger.com.mx=

--_9389b2ea-a5c3-4274-aa32-1cabfff8ca07_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
</style>
</head>
<body class=3D'hmmessage'>
<br><br>Hi<br><br>Some one know why this is happening? <br><br>I change the=
OS to 64 bits and now the oom-killer not hapend but Postgres is still show=
ing out of memory<br><br>Linux SERVER 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16=
:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux<br>Red Hat Enterprise Linux Ser=
ver release 5.2 (Tikanga)<br>PostgreSQL 8.1.15<br>32GB RAM<br><br>My postgr=
esql.conf:<br># - Memory -<br><br>shared_buffers =3D 1048576 =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B # min 16 or max_connections*2=2C 8KB each<br>temp_buf=
fers =3D 1024 =3B =3B =3B =3B =3B =3B =3B  =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B # min 100=2C 8KB each<br>max_prepared_transactions=
=3D 20 =3B =3B =3B =3B =3B =3B =3B&n bsp=3B # c=
an be 0 or more<br># note: increasing max_prepared_transactions costs ~600 =
bytes of shared memory<br># per transaction slot=2C plus lock space (see ma=
x_locks_per_transaction).<br>work_mem =3D 1024 =3B =3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B # min 64=2C size in KB<br>maintenance_work_mem =3D=
65536 =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B # min 1024=2C size in KB<br>max_stack_depth =3D 2048&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B # min 100=2C si=
ze in KB<br><br><br><br>kernel messages:<br>Jul 31 11:50:08 SERVER kernel: =
postmaster[7686]: segfault at 00007fff3feb1bb0 rip 00002b2f7e17e1a8 rsp 000=
07fff3feb1b90 error 6<br>Jul 31 15:41:55 SERVER kernel: postmaster[4737]: s=
egfault at 00007fff3feb1bb0 rip 00002b2f7e1851a8 rsp 00007fff3feb1b90 error=
6<br><br>PostgreSQL log:<br><=3B2009-07-31 15:41:55 MDT =3B =3B&=
nbsp=3B 7253 >=3B LOG: =3B could not fork new process for connection:=
Cannot allocate memory<br><=3B2009-07-31 15:41:55 MDT =3B =3B&nb=
sp=3B 7253 >=3B LOG: =3B could not fork new process for connection: C=
annot allocate memory<br><=3B2009-07-31 15:41:55 MDT 10.27.41.74(2606) af=
oreglobal sysaforeglobal 7423 startup>=3B FATAL: =3B out of memory<br=
><=3B2009-07-31 15:41:55 MDT =3B =3B =3B 7253 >=3B LOG:&nbs=
p=3B could not fork new process for connection: Cannot allocate memory<br>&=
lt=3B2009-07-31 15:41:55 MDT =3B =3B =3B 7253 >=3B LOG: =
=3B could not fork new process for connection: Cannot allocate memory<br>&l=
t=3B2009-07-31 15:41:55 MDT 10.27.36.219(3859) db user 7424 startup>=3B F=
ATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.20.216.82(1=
966) db user 7431 startup>=3B FATAL: =3B out of memory<br>TopMemoryCo=
ntext: 164432 total in 6 blocks=3B 5368 free (1 chunks)=3B 159064 used<br>M=
dSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B 0 used<br>LockTable (loc=
allock hash): 8192 total in 1 blocks=3B 3744 free (0 chunks)=3B 4448 used<b=
r>Timezones: 52560 total in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used<=
br>ErrorContext: 8192 total in 1 blocks=3B 8160 free (4 chunks)=3B 32 used<=
br><=3B2009-07-31 15:41:55 MDT 10.33.128.38(4458) db user 7434 startup>=
=3B FATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.33.128=
..38(4458) db user 7434 startup>=3B DETAIL: =3B Failed on request of s=
ize 24000.<br>TopMemoryContext: 164432 total in 6 blocks=3B 5368 free (1 ch=
unks)=3B 159064 used<br>MdSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B=
0 used<br>LockTable (locallock hash): 8192 total in 1 blocks=3B 3744 free =
(0 chunks)=3B 4448 used<br>Timezones: 52560 total in 2 blocks=3B 3744 free =
(0 chunks)=3B 48816 used<br>ErrorContext: 8192 total in 1 blocks=3B 8160 fr=
ee (4 chunks)=3B 32 used<br><=3B2009-07-31 15:41:55 MDT 10.33.128.38(4459=
) db user 7435 startup>=3B FATAL: =3B out of memory<br><=3B2009-07-=
31 15:41:55 MDT 10.33.128.38(4459) db user 7435 startup>=3B DETAIL: =
=3B Failed on request of size 24000.<br>TopMemoryContext: 164432 total in 6=
blocks=3B 5368 free (1 chunks)=3B 159064 used<br>MdSmgr: 0 total in 0 bloc=
ks=3B 0 free (0 chunks)=3B 0 used<br>LockTable (locallock hash): 8192 total=
in 1 blocks=3B 3744 free (0 chunks)=3B 4448 used<br>Timezones: 52560 total=
in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used<br>ErrorContext: 8192 to=
tal in 1 blocks=3B 8160 free (4 chunks)=3B 32 used<br><=3B2009-07-31 15:4=
1:55 MDT 10.33.128.38(4460) db user 7436 startup>=3B FATAL: =3B out o=
f memory<br><=3B2009-07-31 15:41:55 MDT 10.33.128.38(4460) db user 7436 s=
tartup>=3B DETAIL: =3B Failed on request of size 24000.<br><=3B2009=
-07-31 15:41:55 MDT 10.33.128.38(4461) db user 7438 startup>=3B FATAL:&nb=
sp=3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.33.128.38(4462) db =
user 7439 startup>=3B FATAL: =3B out of memory<br><=3B2009-07-31 15=
:41:55 MDT 10.33.128.38(4463) db user 7440 startup>=3B FATAL: =3B out=
of memory<br><=3B2009-07-31 15:41:55 MDT 10.20.219.194(3594) db user 743=
3 startup>=3B FATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 M=
DT 10.33.128.38(4464) db user 7441 startup>=3B FATAL: =3B out of memo=
ry<br><=3B2009-07-31 15:41:55 MDT 10.33.128.38(4465) db user 7442 startup=
>=3B FATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.33.=
128.31(1263) db user 7447 startup>=3B FATAL: =3B out of memory<br><=
=3B2009-07-31 15:41:55 MDT 10.44.5.43(3498) db user 7450 startup>=3B FATA=
L: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.27.36.219(3860=
) db user 7448 startup>=3B FATAL: =3B out of memory<br><=3B2009-07-=
31 15:41:55 MDT 10.33.128.10(35976) db user 7460 idle>=3B LOG: =3B un=
expected EOF on client connection<br><=3B2009-07-31 15:41:55 MDT =3B&=
nbsp=3B =3B 7253 >=3B LOG: =3B server process (PID 4737) was term=
inated by signal 11<br><=3B2009-07-31 15:41:55 MDT =3B =3B =
=3B 7253 >=3B LOG: =3B terminating any other active server processes<=
br><=3B2009-07-31
15:41:55 MDT 10.33.128.10(35976) db user 7460 idle>=3B WARNING: =3B
terminating connection because of crash of another server process<br><br><b=
r>Before crash: <br><br>date &=3B free -m<br>Fri Jul 31 15:40:01 MDT 200=
9<br> =3B15:40:01 up =3B 4:48=2C =3B 3 users=2C =3B load av=
erage: 2.64=2C 3.04=2C 3.58<br><br> =3B =3B =3B =3B =3B=
 =3B =3B =3B =3B =3B =3B =3B total =3B =
=3B =3B =3B =3B =3B used =3B =3B =3B =3B&nb=
sp=3B =3B free =3B =3B =3B =3B shared =3B =3B&n=
bsp=3B buffers =3B =3B =3B =3B cached<br>Mem: =3B =
=3B =3B =3B =3B =3B =3B =3B 32187 =3B =3B&n=
bsp=3B =3B =3B 22292 =3B =3B =3B =3B =3B =
=3B 9895 =3B =3B =3B =3B =3B =3B =3B  =3B&nb=
sp=3B 0 =3B =3B =3B =3B =3B =3B =3B 164 =3B=
 =3B =3B =3B =3B 19824<br>-/+ buffers/cache: =3B =
=3B =3B =3B =3B =3B 2303 =3B =3B =3B =3B&nb=
sp=3B 29884<br>Swap: =3B =3B =3B =3B =3B =3B =
=3B =3B 1983 =3B =3B =3B =3B =3B =3B =3B &nb=
sp=3B =3B 0 =3B =3B =3B =3B =3B =3B 1983<br><br=
>After crash:<br><br>date &=3B free -m<br>Fri Jul 31 15:45:01 MDT 2009<b=
r> =3B15:45:01 up =3B 4:53=2C =3B 3 users=2C =3B load avera=
ge: 4.45=2C 3.99=2C 3.80<br><br> =3B =3B =3B =3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B total =3B =3B=
 =3B =3B =3B =3B used =3B =3B =3B =3B =
=3B =3B free =3B =3B =3B =3B shared =3B =3B&nbs=
p=3B buffers =3B =3B =3B =3B cached<br>Mem: =3B =3B=
 =3B =3B =3B =3B =3B =3B 32187 =3B =3B =
=3B =3B =3B 14726 =3B =3B =3B =3B =3B 17460&nbs=
p=3B =3B =3B =3B =3B =3B =3B =3B  =3B 0 =
=3B =3B =3B =3B =3B =3B =3B 165 =3B =3B&nbs=
p=3B =3B =3B 13850<br>-/+ buffers/cache: =3B =3B =3B&nb=
sp=3B =3B =3B =3B 710 =3B =3B =3B =3B =3B 3=
1477<br> Swap: =3B =3B =3B =3B =3B =3B =3 B =
=3B 1983 =3B =3B =3B =3B =3B =3B =3B  =3B&nb=
sp=3B 0 =3B =3B =3B =3B =3B =3B 1983<br><br>thanks =
in advance <br> greetings <br><br><br><br><br><br><br><br><br><hr id=3D"sto=
pSpelling">From: fabrixio1 [at] hotmail.com<br>To: alvherre [at] commandprompt.com<br=
>CC: pgsql-admin [at] postgresql.org<br>Subject: Re: [ADMIN] out of memory<br>Da=
te: Fri=2C 20 Mar 2009 09:15:05 -0700<br><br>



<style>
..ExternalClass .EC_hmmessage P
{padding:0px=3B}
..ExternalClass body.EC_hmmessage
{font-size:10pt=3Bfont-family:Verdana=3B}
</style>


<br>Thanks for answer Alvaro<br> =3B<br>Already i have memory overcommi=
t disabled.<br>I've always had with the value 2<br><br>vm.overcommit_memory=
=3D 2<br><br>Fabricio<br><br>>=3B Date: Wed=2C 18 Mar 2009 20:28:02 -040=
0<br>>=3B From: alvherre [at] commandprompt.com<br>>=3B To: fabrixio1 [at] hotmai=
l.com<br>>=3B CC: pgsql-admin [at] postgresql.org<br>>=3B Subject: Re: [ADMI=
N] out of memory<br>>=3B <br>>=3B Fabricio wrote:<br>>=3B >=3B <br>=
>=3B >=3B <br>>=3B >=3B Hi<br>>=3B >=3B <br>>=3B >=3B I hav=
e a dedicated database server with 16 GB of RAM.<br>>=3B >=3B <br>>=
=3B >=3B and the oom-killer is killing my database<br>>=3B <br>>=3B T=
ry disabling memory overcommit=3B see 17.4.3 here:<br>>=3B http://www.pos=
tgresql.org/docs/8.3/interactive/kernel-resources.html<br>>=3B <br>>=3B=
-- <br>>=3B Alvaro Herrera http://www.Com=
mandPrompt.com/<br>>=3B The PostgreSQL Company - Command Prompt=2C Inc.<b=
r><br><br><hr id=3D"stopSpelling">Date: Thu=2C 19 Mar 2009 21:36:00 +0300<b=
r>Subject: Re: [ADMIN] out of memory<br>From: vladimir [at] greenmice.info<br>To=
: fabrixio1 [at] hotmail.com<br>CC: pgsql-admin [at] postgresql.org<br><br><br><br><d=
iv class=3D"EC_gmail_quote">On Fri=2C Mar 13=2C 2009 at 11:15 PM=2C Fabrici=
o <span dir=3D"ltr"><=3B<a href=3D"mailto:fabrixio1 [at] hotmail.com">fabrixio=
1 [at] hotmail.com</a>>=3B</span> wrote:<br><blockquote class=3D"EC_gmail_quot=
e" style=3D"padding-left: 1ex=3B">




<div>
 =3B<br>
Hello...<br>
 =3B<br>
Linux =3B2.6.27.6 #7 SMP Sun Nov 16 00:48:35 MST 2008 i686 i686 i386 GN=
U/Linux<br>
Slackware 11 and Postgres 8.1.15</div></blockquote><div><br><br>Go download=
64-bit OS.<br></div></div><br>-- <br>Vladimir Rusinov<br><a href=3D"http:/=
/greenmice.info/">http://greenmice.info/</a><br>
<hr />Messenger cumpl=
e 10 a=F1os <a href=3D'www.aniversariomessenger.com.mx' target=3D'_new'>de=
ser parte de tu vida</a></body>
</html>=

--_9389b2ea-a5c3-4274-aa32-1cabfff8ca07_--
fabrixio1 [ Fr, 31 Juli 2009 23:20 ] [ ID #2010448 ]

Re: out of memory

--0016364166e98da3e5047010350f
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

On Sat, Aug 1, 2009 at 1:20 AM, Fabricio <fabrixio1 [at] hotmail.com> wrote:

>
>
> Hi
>
> Some one know why this is happening?
>
> I change the OS to 64 bits and now the oom-killer not hapend but Postgres
> is still showing out of memory
>
> Linux SERVER 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64
> x86_64 x86_64 GNU/Linux
> Red Hat Enterprise Linux Server release 5.2 (Tikanga)
> PostgreSQL 8.1.15
> 32GB RAM
>
> My postgresql.conf:
> # - Memory -
>
> shared_buffers = 1048576 # min 16 or
> max_connections*2, 8KB each
> temp_buffers = 1024 # min 100, 8KB each
> max_prepared_transactions = 20 # can be 0 or more
> # note: increasing max_prepared_transactions costs ~600 bytes of shared
> memory
> # per transaction slot, plus lock space (see max_locks_per_transaction).
> work_mem = 1024 # min 64, size in KB
> maintenance_work_mem = 65536 # min 1024, size in KB
> max_stack_depth = 2048 # min 100, size in KB
>
>
>
> kernel messages:
> Jul 31 11:50:08 SERVER kernel: postmaster[7686]: segfault at
> 00007fff3feb1bb0 rip 00002b2f7e17e1a8 rsp 00007fff3feb1b90 error 6
> Jul 31 15:41:55 SERVER kernel: postmaster[4737]: segfault at
> 00007fff3feb1bb0 rip 00002b2f7e1851a8 rsp 00007fff3feb1b90 error 6
>
> PostgreSQL log:
> <2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for
> connection: Cannot allocate memory
> <2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for
> connection: Cannot allocate memory
> <2009-07-31 15:41:55 MDT 10.27.41.74(2606) aforeglobal sysaforeglobal 7423
> startup> FATAL: out of memory
> <2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for
> connection: Cannot allocate memory
> <2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for
> connection: Cannot allocate memory
> <2009-07-31 15:41:55 MDT 10.27.36.219(3859) db user 7424 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.20.216.82(1966) db user 7431 startup> FATAL:
> out of memory
> TopMemoryContext: 164432 total in 6 blocks; 5368 free (1 chunks); 159064
> used
> MdSmgr: 0 total in 0 blocks; 0 free (0 chunks); 0 used
> LockTable (locallock hash): 8192 total in 1 blocks; 3744 free (0 chunks);
> 4448 used
> Timezones: 52560 total in 2 blocks; 3744 free (0 chunks); 48816 used
> ErrorContext: 8192 total in 1 blocks; 8160 free (4 chunks); 32 used
> <2009-07-31 15:41:55 MDT 10.33.128.38(4458) db user 7434 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.33.128.38(4458) db user 7434 startup> DETAIL:
> Failed on request of size 24000.
> TopMemoryContext: 164432 total in 6 blocks; 5368 free (1 chunks); 159064
> used
> MdSmgr: 0 total in 0 blocks; 0 free (0 chunks); 0 used
> LockTable (locallock hash): 8192 total in 1 blocks; 3744 free (0 chunks);
> 4448 used
> Timezones: 52560 total in 2 blocks; 3744 free (0 chunks); 48816 used
> ErrorContext: 8192 total in 1 blocks; 8160 free (4 chunks); 32 used
> <2009-07-31 15:41:55 MDT 10.33.128.38(4459) db user 7435 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.33.128.38(4459) db user 7435 startup> DETAIL:
> Failed on request of size 24000.
> TopMemoryContext: 164432 total in 6 blocks; 5368 free (1 chunks); 159064
> used
> MdSmgr: 0 total in 0 blocks; 0 free (0 chunks); 0 used
> LockTable (locallock hash): 8192 total in 1 blocks; 3744 free (0 chunks);
> 4448 used
> Timezones: 52560 total in 2 blocks; 3744 free (0 chunks); 48816 used
> ErrorContext: 8192 total in 1 blocks; 8160 free (4 chunks); 32 used
> <2009-07-31 15:41:55 MDT 10.33.128.38(4460) db user 7436 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.33.128.38(4460) db user 7436 startup> DETAIL:
> Failed on request of size 24000.
> <2009-07-31 15:41:55 MDT 10.33.128.38(4461) db user 7438 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.33.128.38(4462) db user 7439 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.33.128.38(4463) db user 7440 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.20.219.194(3594) db user 7433 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.33.128.38(4464) db user 7441 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.33.128.38(4465) db user 7442 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.33.128.31(1263) db user 7447 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.44.5.43(3498) db user 7450 startup> FATAL: out
> of memory
> <2009-07-31 15:41:55 MDT 10.27.36.219(3860) db user 7448 startup> FATAL:
> out of memory
> <2009-07-31 15:41:55 MDT 10.33.128.10(35976) db user 7460 idle> LOG:
> unexpected EOF on client connection
> <2009-07-31 15:41:55 MDT 7253 > LOG: server process (PID 4737) was
> terminated by signal 11
> <2009-07-31 15:41:55 MDT 7253 > LOG: terminating any other active
> server processes
> <2009-07-31 15:41:55 MDT 10.33.128.10(35976) db user 7460 idle> WARNING:
> terminating connection because of crash of another server process
>
>
> Before crash:
>
> date & free -m
> Fri Jul 31 15:40:01 MDT 2009
> 15:40:01 up 4:48, 3 users, load average: 2.64, 3.04, 3.58
>
> total used free shared buffers cached
> Mem: 32187 22292 9895 0 164 19824
> -/+ buffers/cache: 2303 29884
> Swap: 1983 0 1983
>
> After crash:
>
> date & free -m
> Fri Jul 31 15:45:01 MDT 2009
> 15:45:01 up 4:53, 3 users, load average: 4.45, 3.99, 3.80
>
> total used free shared buffers cached
> Mem: 32187 14726 17460 0 165 13850
> -/+ buffers/cache: 710 31477
> Swap: 1983 0 1983
>

Hm, It looks weird.
BTW, I assume that 24000 in "DETAIL: Failed on request of size 24000" is
size in bytes, but may be it's size in kilobytes? o_O

How many connections (active and max) do you have?
Are you sure that nothing else could eat memory (e.g. some poorly-written
cronjob?)
How many VIRT memory does postmaster have before the crash?

Here is some suggersions:
Check memory limits in /etc/security/limits.conf and in `ulimit -a`.
tail /var/log/audit/audit.log (it might be something interesting there
especially if you are running selinux)
Try to upgrade to 8.1.17 (it should be safe and fast operation).
Check your kernerl's shm settings.
Check fsm settings.

HTH


--
Vladimir Rusinov
http://greenmice.info/

--0016364166e98da3e5047010350f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Sat, Aug 1, 2009 at 1:20 AM, Fabricio=
<span dir=3D"ltr"><<a href=3D"mailto:fabrixio1 [at] hotmail.com">fabrixio1 [at] h=
otmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; p=
adding-left: 1ex;">




<div>
<br><br>Hi<br><br>Some one know why this is happening? <br><br>I change the=
OS to 64 bits and now the oom-killer not hapend but Postgres is still show=
ing out of memory<br><br>Linux SERVER 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16=
:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux<br>
Red Hat Enterprise Linux Server release 5.2 (Tikanga)<br>PostgreSQL 8.1.15<=
br>32GB RAM<br><br>My postgresql.conf:<br># - Memory -<br><br>shared_buffer=
s =3D 1048576=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A 0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 # min 16 or max_connections*2, 8KB each<br>
temp_buffers =3D 1024=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 # min 10=
0, 8KB each<br>max_prepared_transactions =3D 20=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 # can be 0 or more<br># note: increasing max_prepared=
_transactions costs ~600 bytes of shared memory<br># per transaction slot, =
plus lock space (see max_locks_per_transaction).<br>
work_mem =3D 1024=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C 2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # min 64, size in KB<br>maintenance=
_work_mem =3D 65536=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 # min 1024, size in KB<br>max_stack_depth =3D 2048=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 # min 100, size in KB<br><br><br><br>kernel messages:<br>Ju=
l 31 11:50:08 SERVER kernel: postmaster[7686]: segfault at 00007fff3feb1bb0=
rip 00002b2f7e17e1a8 rsp 00007fff3feb1b90 error 6<br>
Jul 31 15:41:55 SERVER kernel: postmaster[4737]: segfault at 00007fff3feb1b=
b0 rip 00002b2f7e1851a8 rsp 00007fff3feb1b90 error 6<br><br>PostgreSQL log:=
<br><2009-07-31 15:41:55 MDT=C2=A0=C2=A0=C2=A0 7253 > LOG:=C2=A0 coul=
d not fork new process for connection: Cannot allocate memory<br>
<2009-07-31 15:41:55 MDT=C2=A0=C2=A0=C2=A0 7253 > LOG:=C2=A0 could no=
t fork new process for connection: Cannot allocate memory<br><2009-07-31=
15:41:55 MDT 10.27.41.74(2606) aforeglobal sysaforeglobal 7423 startup>=
FATAL:=C2=A0 out of memory<br>
<2009-07-31 15:41:55 MDT=C2=A0=C2=A0=C2=A0 7253 > LOG:=C2=A0 could no=
t fork new process for connection: Cannot allocate memory<br><2009-07-31=
15:41:55 MDT=C2=A0=C2=A0=C2=A0 7253 > LOG:=C2=A0 could not fork new pro=
cess for connection: Cannot allocate memory<br>
<2009-07-31 15:41:55 MDT 10.27.36.219(3859) db user 7424 startup> FAT=
AL:=C2=A0 out of memory<br><2009-07-31 15:41:55 MDT 10.20.216.82(1966) d=
b user 7431 startup> FATAL:=C2=A0 out of memory<br>TopMemoryContext: 164=
432 total in 6 blocks; 5368 free (1 chunks); 159064 used<br>
MdSmgr: 0 total in 0 blocks; 0 free (0 chunks); 0 used<br>LockTable (locall=
ock hash): 8192 total in 1 blocks; 3744 free (0 chunks); 4448 used<br>Timez=
ones: 52560 total in 2 blocks; 3744 free (0 chunks); 48816 used<br>ErrorCon=
text: 8192 total in 1 blocks; 8160 free (4 chunks); 32 used<br>
<2009-07-31 15:41:55 MDT 10.33.128.38(4458) db user 7434 startup> FAT=
AL:=C2=A0 out of memory<br><2009-07-31 15:41:55 MDT 10.33.128.38(4458) d=
b user 7434 startup> DETAIL:=C2=A0 Failed on request of size 24000.<br>T=
opMemoryContext: 164432 total in 6 blocks; 5368 free (1 chunks); 159064 use=
d<br>
MdSmgr: 0 total in 0 blocks; 0 free (0 chunks); 0 used<br>LockTable (locall=
ock hash): 8192 total in 1 blocks; 3744 free (0 chunks); 4448 used<br>Timez=
ones: 52560 total in 2 blocks; 3744 free (0 chunks); 48816 used<br>ErrorCon=
text: 8192 total in 1 blocks; 8160 free (4 chunks); 32 used<br>
<2009-07-31 15:41:55 MDT 10.33.128.38(4459) db user 7435 startup> FAT=
AL:=C2=A0 out of memory<br><2009-07-31 15:41:55 MDT 10.33.128.38(4459) d=
b user 7435 startup> DETAIL:=C2=A0 Failed on request of size 24000.<br>T=
opMemoryContext: 164432 total in 6 blocks; 5368 free (1 chunks); 159064 use=
d<br>
MdSmgr: 0 total in 0 blocks; 0 free (0 chunks); 0 used<br>LockTable (locall=
ock hash): 8192 total in 1 blocks; 3744 free (0 chunks); 4448 used<br>Timez=
ones: 52560 total in 2 blocks; 3744 free (0 chunks); 48816 used<br>ErrorCon=
text: 8192 total in 1 blocks; 8160 free (4 chunks); 32 used<br>
<2009-07-31 15:41:55 MDT 10.33.128.38(4460) db user 7436 startup> FAT=
AL:=C2=A0 out of memory<br><2009-07-31 15:41:55 MDT 10.33.128.38(4460) d=
b user 7436 startup> DETAIL:=C2=A0 Failed on request of size 24000.<br>&=
lt;2009-07-31 15:41:55 MDT 10.33.128.38(4461) db user 7438 startup> FATA=
L:=C2=A0 out of memory<br>
<2009-07-31 15:41:55 MDT 10.33.128.38(4462) db user 7439 startup> FAT=
AL:=C2=A0 out of memory<br><2009-07-31 15:41:55 MDT 10.33.128.38(4463) d=
b user 7440 startup> FATAL:=C2=A0 out of memory<br><2009-07-31 15:41:=
55 MDT 10.20.219.194(3594) db user 7433 startup> FATAL:=C2=A0 out of mem=
ory<br>
<2009-07-31 15:41:55 MDT 10.33.128.38(4464) db user 7441 startup> FAT=
AL:=C2=A0 out of memory<br><2009-07-31 15:41:55 MDT 10.33.128.38(4465) d=
b user 7442 startup> FATAL:=C2=A0 out of memory<br><2009-07-31 15:41:=
55 MDT 10.33.128.31(1263) db user 7447 startup> FATAL:=C2=A0 out of memo=
ry<br>
<2009-07-31 15:41:55 MDT 10.44.5.43(3498) db user 7450 startup> FATAL=
:=C2=A0 out of memory<br><2009-07-31 15:41:55 MDT 10.27.36.219(3860) db =
user 7448 startup> FATAL:=C2=A0 out of memory<br><2009-07-31 15:41:55=
MDT 10.33.128.10(35976) db user 7460 idle> LOG:=C2=A0 unexpected EOF on=
client connection<br>
<2009-07-31 15:41:55 MDT=C2=A0=C2=A0=C2=A0 7253 > LOG:=C2=A0 server p=
rocess (PID 4737) was terminated by signal 11<br><2009-07-31 15:41:55 MD=
T=C2=A0=C2=A0=C2=A0 7253 > LOG:=C2=A0 terminating any other active serve=
r processes<br><2009-07-31
15:41:55 MDT 10.33.128.10(35976) db user 7460 idle> WARNING:=C2=A0
terminating connection because of crash of another server process<br><br><b=
r>Before crash: <br><br>date & free -m<br>Fri Jul 31 15:40:01 MDT 2009<=
br>=C2=A015:40:01 up=C2=A0 4:48,=C2=A0 3 users,=C2=A0 load average: 2.64, 3=
..04, 3.58<br><br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 to=
tal=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 used=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 free=C2=A0=C2=A0=C2=A0=C2=A0 shared=C2=A0=C2=A0=C2=A0 buffers=C2=A0=
=C2=A0=C2=A0=C2=A0 cached<br>Mem:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 32187=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 22292=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 9895=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 164=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1=
9824<br>-/+ buffers/cache:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2303=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 29884<br>Swap:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 1983=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1983<br>
<br>After crash:<br><br>date & free -m<br>Fri Jul 31 15:45:01 MDT 2009<=
br>=C2=A015:45:01 up=C2=A0 4:53,=C2=A0 3 users,=C2=A0 load average: 4.45, 3=
..99, 3.80<br><br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 total=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 used=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 free=C2=A0=C2=A0=C2=A0=C2=A0 shared=C2=A0=C2=A0=C2=
=A0 buffers=C2=A0=C2=A0=C2=A0=C2=A0 cached<br>
Mem:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 32187=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 14726=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 17460=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 165=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 13850<br>-/+ buffers/cache:=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 710=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 3147=
7<br>Swap:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1983=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 1983</div></blockquote><div><br>Hm, It looks weird.<br>BTW, I assume=
that 24000 in "DETAIL:=C2=A0 Failed on request of size 24000" is=
size in bytes, but may be it's size in kilobytes? o_O<br>
<br>How many connections (active and max) do you have?<br>Are you sure that=
nothing else could eat memory (e.g. some poorly-written cronjob?)<br>How m=
any VIRT memory does postmaster have before the crash?<br><br>Here is some =
suggersions:<br>
Check memory limits in /etc/security/limits.conf and in `ulimit -a`.<br>tai=
l /var/log/audit/audit.log (it might be something interesting there especia=
lly if you are running selinux)<br>Try to upgrade to 8.1.17 (it should be s=
afe and fast operation).<br>
Check your kernerl's shm settings.<br>Check fsm settings.<br><br>HTH<br=
></div></div><br clear=3D"all"><br>-- <br>Vladimir Rusinov<br><a href=3D"ht=
tp://greenmice.info/">http://greenmice.info/</a><br>

--0016364166e98da3e5047010350f--
Vladimir Rusinov [ Sa, 01 August 2009 10:20 ] [ ID #2010634 ]

Re: out of memory

>
> Some one know why this is happening?
>
> I change the OS to 64 bits and now the oom-killer not hapend but Postgres=
is
> still showing out of memory
>
> Linux SERVER 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86=
_64
> x86_64 GNU/Linux
> Red Hat Enterprise Linux Server release 5.2 (Tikanga)
> PostgreSQL 8.1.15
> 32GB RAM
>
> My postgresql.conf:
> # - Memory -
>
> shared_buffers =3D 1048576=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2 =A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 # min 16 or
> max_connections*2, 8KB each
> temp_buffers =3D 1024=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2 =A0=C2=A0 # min=
100, 8KB each
> max_prepared_transactions =3D 20=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 # can be 0 or more
> # note: increasing max_prepared_transactions costs ~600 bytes of shared
> memory
> # per transaction slot, plus lock space (see max_locks_per_transaction).
> work_mem =3D 1024=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # min 64, size in KB
> maintenance_work_mem =3D 65536=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 # min 1024, size in KB
> max_stack_depth =3D 2048=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # min 100, size in KB
>

What about the shmmax and shmall kernel parametters?
Which values you are managing?

--
Emanuel Calvo Franco
www.emanuelcalvofranco.com.ar

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Emanuel Calvo Franco [ Sa, 01 August 2009 18:11 ] [ ID #2010635 ]

Re: out of memory

--_5fa4d650-63a5-4bda-8620-82567108ebfd_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable




thanks Vladimir and Emanuel

>How many connections (active and max) do you have?
max_connections =3D 2000
Active 1000

>Are you sure that nothing else could eat memory (e.g. some poorly-writte=
n cronjob?)
There are 2 or 3 ligth cronjob's
but the free command show free memory... why? :s


>How many VIRT memory does postmaster have before the crash?
8518m

>Here is some suggersions:
>Check memory limits in /etc/security/limits.conf and in `ulimit -a`.
The config file is the default
[postgres [at] SERVER ~]$ ulimit -a
core file size (blocks=2C -c) 0
data seg size (kbytes=2C -d) unlimited
scheduling priority (-e) 0
file size (blocks=2C -f) unlimited
pending signals (-i) 268287
max locked memory (kbytes=2C -l) 32
max memory size (kbytes=2C -m) unlimited
open files (-n) 1024
pipe size (512 bytes=2C -p) 8
POSIX message queues (bytes=2C -q) 819200
real-time priority (-r) 0
stack size (kbytes=2C -s) 10240
cpu time (seconds=2C -t) unlimited
max user processes (-u) 268287
virtual memory (kbytes=2C -v) unlimited
file locks (-x) unlimited


>tail /var/log/audit/audit.log (it might be something interesting there es=
pecially if you are running selinux)
selinux is disabled

>Try to upgrade to 8.1.17 (it should be safe and fast operation).
I will update


>Check your kernerl's shm settings.
kernel.shmmax =3D 68719476736
kernel.shmall =3D 4294967296
Are the default=2C i think are too big already

>Check fsm settings.
max_fsm_pages =3D 180000



regards...




Date: Sat=2C 1 Aug 2009 12:20:27 +0400
Subject: Re: [ADMIN] out of memory
From: vladimir [at] greenmice.info
To: fabrixio1 [at] hotmail.com
CC: pgsql-admin [at] postgresql.org=3B alvherre [at] commandprompt.com



On Sat=2C Aug 1=2C 2009 at 1:20 AM=2C Fabricio <fabrixio1 [at] hotmail.com> wrot=
e:








Hi

Some one know why this is happening?

I change the OS to 64 bits and now the oom-killer not hapend but Postgres i=
s still showing out of memory

Linux SERVER 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_6=
4 x86_64 GNU/Linux

Red Hat Enterprise Linux Server release 5.2 (Tikanga)
PostgreSQL 8.1.15
32GB RAM

My postgresql.conf:
# - Memory -

shared_buffers =3D 1048576 # min 16 or max_connectio=
ns*2=2C 8KB each

temp_buffers =3D 1024 # min 100=2C 8KB each
max_prepared_transactions =3D 20 # can be 0 or more
# note: increasing max_prepared_transactions costs ~600 bytes of shared mem=
ory
# per transaction slot=2C plus lock space (see max_locks_per_transaction).

work_mem =3D 1024 # min 64=2C size in KB
maintenance_work_mem =3D 65536 # min 1024=2C size in KB
max_stack_depth =3D 2048 # min 100=2C size in KB



kernel messages:
Jul 31 11:50:08 SERVER kernel: postmaster[7686]: segfault at 00007fff3feb1b=
b0 rip 00002b2f7e17e1a8 rsp 00007fff3feb1b90 error 6

Jul 31 15:41:55 SERVER kernel: postmaster[4737]: segfault at 00007fff3feb1b=
b0 rip 00002b2f7e1851a8 rsp 00007fff3feb1b90 error 6

PostgreSQL log:
<2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for con=
nection: Cannot allocate memory

<2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for con=
nection: Cannot allocate memory
<2009-07-31 15:41:55 MDT 10.27.41.74(2606) aforeglobal sysaforeglobal 7423 =
startup> FATAL: out of memory

<2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for con=
nection: Cannot allocate memory
<2009-07-31 15:41:55 MDT 7253 > LOG: could not fork new process for con=
nection: Cannot allocate memory

<2009-07-31 15:41:55 MDT 10.27.36.219(3859) db user 7424 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.20.216.82(1966) db user 7431 startup> FATAL: o=
ut of memory
TopMemoryContext: 164432 total in 6 blocks=3B 5368 free (1 chunks)=3B 15906=
4 used

MdSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B 0 used
LockTable (locallock hash): 8192 total in 1 blocks=3B 3744 free (0 chunks)=
=3B 4448 used
Timezones: 52560 total in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used
ErrorContext: 8192 total in 1 blocks=3B 8160 free (4 chunks)=3B 32 used

<2009-07-31 15:41:55 MDT 10.33.128.38(4458) db user 7434 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4458) db user 7434 startup> DETAIL: =
Failed on request of size 24000.
TopMemoryContext: 164432 total in 6 blocks=3B 5368 free (1 chunks)=3B 15906=
4 used

MdSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B 0 used
LockTable (locallock hash): 8192 total in 1 blocks=3B 3744 free (0 chunks)=
=3B 4448 used
Timezones: 52560 total in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used
ErrorContext: 8192 total in 1 blocks=3B 8160 free (4 chunks)=3B 32 used

<2009-07-31 15:41:55 MDT 10.33.128.38(4459) db user 7435 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4459) db user 7435 startup> DETAIL: =
Failed on request of size 24000.
TopMemoryContext: 164432 total in 6 blocks=3B 5368 free (1 chunks)=3B 15906=
4 used

MdSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B 0 used
LockTable (locallock hash): 8192 total in 1 blocks=3B 3744 free (0 chunks)=
=3B 4448 used
Timezones: 52560 total in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used
ErrorContext: 8192 total in 1 blocks=3B 8160 free (4 chunks)=3B 32 used

<2009-07-31 15:41:55 MDT 10.33.128.38(4460) db user 7436 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4460) db user 7436 startup> DETAIL: =
Failed on request of size 24000.
<2009-07-31 15:41:55 MDT 10.33.128.38(4461) db user 7438 startup> FATAL: o=
ut of memory

<2009-07-31 15:41:55 MDT 10.33.128.38(4462) db user 7439 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4463) db user 7440 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.20.219.194(3594) db user 7433 startup> FATAL: =
out of memory

<2009-07-31 15:41:55 MDT 10.33.128.38(4464) db user 7441 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.38(4465) db user 7442 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.31(1263) db user 7447 startup> FATAL: o=
ut of memory

<2009-07-31 15:41:55 MDT 10.44.5.43(3498) db user 7450 startup> FATAL: out=
of memory
<2009-07-31 15:41:55 MDT 10.27.36.219(3860) db user 7448 startup> FATAL: o=
ut of memory
<2009-07-31 15:41:55 MDT 10.33.128.10(35976) db user 7460 idle> LOG: unexp=
ected EOF on client connection

<2009-07-31 15:41:55 MDT 7253 > LOG: server process (PID 4737) was term=
inated by signal 11
<2009-07-31 15:41:55 MDT 7253 > LOG: terminating any other active serve=
r processes
<2009-07-31
15:41:55 MDT 10.33.128.10(35976) db user 7460 idle> WARNING:
terminating connection because of crash of another server process


Before crash:

date & free -m
Fri Jul 31 15:40:01 MDT 2009
15:40:01 up 4:48=2C 3 users=2C load average: 2.64=2C 3.04=2C 3.58


total used free shared buffers cached
Mem: 32187 22292 9895 0 164 19824
-/+ buffers/cache: 2303 29884
Swap: 1983 0 1983


After crash:

date & free -m
Fri Jul 31 15:45:01 MDT 2009
15:45:01 up 4:53=2C 3 users=2C load average: 4.45=2C 3.99=2C 3.80

total used free shared buffers cached

Mem: 32187 14726 17460 0 165 13850
-/+ buffers/cache: 710 31477
Swap: 1983 0 1983
Hm=2C It looks weird.
BTW=2C I assume that 24000 in "DETAIL: Failed on request of size 24000" is=
size in bytes=2C but may be it's size in kilobytes? o_O


How many connections (active and max) do you have?
Are you sure that nothing else could eat memory (e.g. some poorly-written c=
ronjob?)
How many VIRT memory does postmaster have before the crash?

Here is some suggersions:

Check memory limits in /etc/security/limits.conf and in `ulimit -a`.
tail /var/log/audit/audit.log (it might be something interesting there espe=
cially if you are running selinux)
Try to upgrade to 8.1.17 (it should be safe and fast operation).

Check your kernerl's shm settings.
Check fsm settings.

HTH

--
Vladimir Rusinov
http://greenmice.info/

____________________________________________________________ _____
Gracias Messenger por estos 10 a=F1os
www.aniversariomessenger.com.mx=

--_5fa4d650-63a5-4bda-8620-82567108ebfd_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
</style>
</head>
<body class=3D'hmmessage'>
<br><br>thanks Vladimir and Emanuel<br><br> =3B =3B =3B >=3BH=
ow many connections (active and max) <span class=3D"Object" id=3D"EC_OBJ_PR=
EFIX_DWT1757">do</span> you have?<br>max_connections =3D 2000<br>Active 100=
0<br><br> =3B >=3BAre you sure that nothing else could eat memory (e.=
g. some poorly-written cronjob?)<br>There are 2 or 3 =3B ligth cronjob'=
s<br>but the free command show free memory... why? :s<br><br><br> =3B &=
gt=3BHow many VIRT memory does postmaster have before the crash? <br>8518m<=
br><br> =3B>=3BHere is some suggersions:<br> =3B>=3BCheck memor=
y limits in /etc/security/limits.conf and in `ulimit -a`.<br>The config fil=
e is the default<br>[postgres [at] SERVER ~]$ ulimit -a<br>core file size =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B (blocks=
=2C -c) 0<br>data seg size =3B =3B =3B =3B =3B =3B&=
nbsp=3B =3B =3B =3B (kbytes=2C -d) unlimited<br>scheduling prio=
rity =3B =3B =3B =3B =3B =3B =3B  =3B =
=3B =3B =3B =3B (-e) 0<br>file size =3B =3B =3B&nbs=
p=3B =3B =3B =3B =3B =3B =3B =3B  =3B =
=3B =3B (blocks=2C -f) unlimited<br>pending signals =3B =3B&nbs=
p=3B =3B =3B =3B =3B =3B =3B =3B  =3B =
=3B =3B =3B =3B =3B (-i) 268287<br>max locked memory =
=3B =3B =3B =3B =3B =3B (kbytes=2C -l) 32<br>max memory=
size =3B =3B =3B =3B =3B =3B =3B  =3B (kbyt=
es=2C -m) unlimited<br>open files =3B =3B =3B =3B =3B&n=
bsp=3B =3B =3B =3B =3B =3B =3B = 3B =3B =
=3B =3B =3B =3B =3B =3B =3B (-n) 1024<br>pipe size&=
nbsp=3B =3B =3B =3B =3B =3B =3B  =3B =3B&nbs=
p=3B =3B (512 bytes=2C -p) 8<br>POSIX message queues =3B =3B&nb=
sp=3B =3B (bytes=2C -q) 819200<br>real-time priority =3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B =3B =
=3B =3B (-r) 0<br>stack size =3B =3B =3B =3B =3B&nb=
sp=3B =3B =3B =3B =3B =3B =3B =3 B (kbytes=2C -s=
) 10240<br>cpu time =3B =3B =3B =3B =3B =3B =3B =
 =3B =3B =3B =3B =3B =3B =3B (seconds=2C -t) un=
limited<br>max user processes =3B =3B =3B =3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B (-u) 268287<br>=
virtual memory =3B =3B =3B =3B =3B =3B = 3B =
=3B =3B (kbytes=2C -v) unlimited<br>file locks =3B =3B =3B&=
nbsp=3B =3B =3B =3B =3B =3B =3B  =3B =3B&nbs=
p=3B =3B =3B =3B =3B =3B =3B =3B  =3B (-x) u=
nlimited<br><br><br> =3B>=3Btail /var/log/audit/audit.log (it might b=
e something interesting there especially if you are running selinux)<br>sel=
inux is disabled<br><br> =3B>=3BTry to upgrade to 8.1.17 (it should b=
e safe and fast operation).<br>I will update<br><br> =3B
>=3BCheck your kernerl's shm settings.<br>kernel.shmmax =3D 68719476736<b=
r>kernel.shmall =3D 4294967296<br>Are the default=2C i think are too big al=
ready<br><br> =3B>=3BCheck fsm settings.<br>max_fsm_pages =3D 180000 =
<br><br><br><br>regards...<br><br><br><br><br><hr id=3D"stopSpelling">Date:=
Sat=2C 1 Aug 2009 12:20:27 +0400<br>Subject: Re: [ADMIN] out of memory<br>=
From: vladimir [at] greenmice.info<br>To: fabrixio1 [at] hotmail.com<br>CC: pgsql-adm=
in [at] postgresql.org=3B alvherre [at] commandprompt.com<br><br><br><br><div class=
=3D"EC_gmail_quote">On Sat=2C Aug 1=2C 2009 at 1:20 AM=2C Fabricio <span di=
r=3D"ltr"><=3B<a href=3D"mailto:fabrixio1 [at] hotmail.com">fabrixio1 [at] hotmail.=
com</a>>=3B</span> wrote:<br><blockquote class=3D"EC_gmail_quote" style=
=3D"padding-left: 1ex=3B">




<div>
<br><br>Hi<br><br>Some one know why this is happening? <br><br>I change the=
OS to 64 bits and now the oom-killer not hapend but Postgres is still show=
ing out of memory<br><br>Linux SERVER 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16=
:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux<br>
Red Hat Enterprise Linux Server release 5.2 (Tikanga)<br>PostgreSQL 8.1.15<=
br>32GB RAM<br><br>My postgresql.conf:<br># - Memory -<br><br>shared_buffer=
s =3D 1048576 =3B =3B =3B =3B =3B =3B  =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B =3B =3B # min 16 or max_connection=
s*2=2C 8KB each<br>
temp_buffers =3D 1024 =3B =3B =3B =3B =3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B # min 100=2C 8KB each<br>max_prepared_tran=
sactions =3D 20 =3B =3B =3B =3B =3B =3B =3B&n bs=
p=3B # can be 0 or more<br># note: increasing max_prepared_transactions cos=
ts ~600 bytes of shared memory<br># per transaction slot=2C plus lock space=
(see max_locks_per_transaction).<br>
work_mem =3D 1024 =3B =3B =3B =3B =3B =3B =3B &n=
bsp=3B =3B =3B =3B =3B =3B =3B = 3B =3B # mi=
n 64=2C size in KB<br>maintenance_work_mem =3D 65536 =3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B # min 1=
024=2C size in KB<br>max_stack_depth =3D 2048 =3B =3B =3B =
=3B =3B =3B =3B =3B =3B =3B =3B& nbsp=3B =3B=
 =3B =3B =3B =3B # min 100=2C size in KB<br><br><br><br>ker=
nel messages:<br>Jul 31 11:50:08 SERVER kernel: postmaster[7686]: segfault =
at 00007fff3feb1bb0 rip 00002b2f7e17e1a8 rsp 00007fff3feb1b90 error 6<br>
Jul 31 15:41:55 SERVER kernel: postmaster[4737]: segfault at 00007fff3feb1b=
b0 rip 00002b2f7e1851a8 rsp 00007fff3feb1b90 error 6<br><br>PostgreSQL log:=
<br><=3B2009-07-31 15:41:55 MDT =3B =3B =3B 7253 >=3B LOG:&=
nbsp=3B could not fork new process for connection: Cannot allocate memory<b=
r>
<=3B2009-07-31 15:41:55 MDT =3B =3B =3B 7253 >=3B LOG: =
=3B could not fork new process for connection: Cannot allocate memory<br>&l=
t=3B2009-07-31 15:41:55 MDT 10.27.41.74(2606) aforeglobal sysaforeglobal 74=
23 startup>=3B FATAL: =3B out of memory<br>
<=3B2009-07-31 15:41:55 MDT =3B =3B =3B 7253 >=3B LOG: =
=3B could not fork new process for connection: Cannot allocate memory<br>&l=
t=3B2009-07-31 15:41:55 MDT =3B =3B =3B 7253 >=3B LOG: =
=3B could not fork new process for connection: Cannot allocate memory<br>
<=3B2009-07-31 15:41:55 MDT 10.27.36.219(3859) db user 7424 startup>=3B=
FATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.20.216.82=
(1966) db user 7431 startup>=3B FATAL: =3B out of memory<br>TopMemory=
Context: 164432 total in 6 blocks=3B 5368 free (1 chunks)=3B 159064 used<br=
>
MdSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B 0 used<br>LockTable (lo=
callock hash): 8192 total in 1 blocks=3B 3744 free (0 chunks)=3B 4448 used<=
br>Timezones: 52560 total in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used=
<br>ErrorContext: 8192 total in 1 blocks=3B 8160 free (4 chunks)=3B 32 used=
<br>
<=3B2009-07-31 15:41:55 MDT 10.33.128.38(4458) db user 7434 startup>=3B=
FATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.33.128.38=
(4458) db user 7434 startup>=3B DETAIL: =3B Failed on request of size=
24000.<br>TopMemoryContext: 164432 total in 6 blocks=3B 5368 free (1 chunk=
s)=3B 159064 used<br>
MdSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B 0 used<br>LockTable (lo=
callock hash): 8192 total in 1 blocks=3B 3744 free (0 chunks)=3B 4448 used<=
br>Timezones: 52560 total in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used=
<br>ErrorContext: 8192 total in 1 blocks=3B 8160 free (4 chunks)=3B 32 used=
<br>
<=3B2009-07-31 15:41:55 MDT 10.33.128.38(4459) db user 7435 startup>=3B=
FATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.33.128.38=
(4459) db user 7435 startup>=3B DETAIL: =3B Failed on request of size=
24000.<br>TopMemoryContext: 164432 total in 6 blocks=3B 5368 free (1 chunk=
s)=3B 159064 used<br>
MdSmgr: 0 total in 0 blocks=3B 0 free (0 chunks)=3B 0 used<br>LockTable (lo=
callock hash): 8192 total in 1 blocks=3B 3744 free (0 chunks)=3B 4448 used<=
br>Timezones: 52560 total in 2 blocks=3B 3744 free (0 chunks)=3B 48816 used=
<br>ErrorContext: 8192 total in 1 blocks=3B 8160 free (4 chunks)=3B 32 used=
<br>
<=3B2009-07-31 15:41:55 MDT 10.33.128.38(4460) db user 7436 startup>=3B=
FATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.33.128.38=
(4460) db user 7436 startup>=3B DETAIL: =3B Failed on request of size=
24000.<br><=3B2009-07-31 15:41:55 MDT 10.33.128.38(4461) db user 7438 st=
artup>=3B FATAL: =3B out of memory<br>
<=3B2009-07-31 15:41:55 MDT 10.33.128.38(4462) db user 7439 startup>=3B=
FATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.33.128.38=
(4463) db user 7440 startup>=3B FATAL: =3B out of memory<br><=3B200=
9-07-31 15:41:55 MDT 10.20.219.194(3594) db user 7433 startup>=3B FATAL:&=
nbsp=3B out of memory<br>
<=3B2009-07-31 15:41:55 MDT 10.33.128.38(4464) db user 7441 startup>=3B=
FATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.33.128.38=
(4465) db user 7442 startup>=3B FATAL: =3B out of memory<br><=3B200=
9-07-31 15:41:55 MDT 10.33.128.31(1263) db user 7447 startup>=3B FATAL:&n=
bsp=3B out of memory<br>
<=3B2009-07-31 15:41:55 MDT 10.44.5.43(3498) db user 7450 startup>=3B F=
ATAL: =3B out of memory<br><=3B2009-07-31 15:41:55 MDT 10.27.36.219(3=
860) db user 7448 startup>=3B FATAL: =3B out of memory<br><=3B2009-=
07-31 15:41:55 MDT 10.33.128.10(35976) db user 7460 idle>=3B LOG: =3B=
unexpected EOF on client connection<br>
<=3B2009-07-31 15:41:55 MDT =3B =3B =3B 7253 >=3B LOG: =
=3B server process (PID 4737) was terminated by signal 11<br><=3B2009-07-=
31 15:41:55 MDT =3B =3B =3B 7253 >=3B LOG: =3B terminatin=
g any other active server processes<br><=3B2009-07-31
15:41:55 MDT 10.33.128.10(35976) db user 7460 idle>=3B WARNING: =3B
terminating connection because of crash of another server process<br><br><b=
r>Before crash: <br><br>date &=3B free -m<br>Fri Jul 31 15:40:01 MDT 200=
9<br> =3B15:40:01 up =3B 4:48=2C =3B 3 users=2C =3B load av=
erage: 2.64=2C 3.04=2C 3.58<br><br>
 =3B =3B =3B =3B =3B =3B =3B&nbs p=3B =3B&nb=
sp=3B =3B =3B total =3B =3B =3B =3B =3B =3B=
used =3B =3B =3B =3B =3B =3B free =3B =3B&=
nbsp=3B =3B shared =3B =3B =3B buffers =3B =3B =
=3B =3B cached<br>Mem: =3B =3B =3B =3B =3B =3B&=
nbsp=3B =3B 32187 =3B =3B =3B =3B =3B 22292 =3B=
 =3B =3B =3B =3B =3B 9895 =3B =3B =3B =
=3B =3B =3B =3B =3B =3B 0 =3B =3B =3B =
=3B =3B =3B =3B 164 =3B =3B =3B =3B =3B 198=
24<br>-/+ buffers/cache: =3B =3B =3B =3B =3B = 3B 23=
03 =3B =3B =3B =3B =3B 29884<br>Swap: =3B =3B&n=
bsp=3B =3B =3B =3B =3B =3B 1983 =3B =3B =3B=
 =3B =3B =3B =3B =3B =3B 0 =3B =3B =3B&=
nbsp=3B =3B =3B 1983<br>
<br>After crash:<br><br>date &=3B free -m<br>Fri Jul 31 15:45:01 MDT 200=
9<br> =3B15:45:01 up =3B 4:53=2C =3B 3 users=2C =3B load av=
erage: 4.45=2C 3.99=2C 3.80<br><br> =3B =3B =3B =3B =3B=
 =3B =3B =3B =3B =3B =3B =3B total =3B =
=3B =3B =3B =3B =3B used =3B =3B =3B =3B&nb=
sp=3B =3B free =3B =3B =3B =3B shared =3B =3B&n=
bsp=3B buffers =3B =3B =3B =3B cached<br>
Mem: =3B =3B =3B =3B =3B =3B =3B  =3B 32187&=
nbsp=3B =3B =3B =3B =3B 14726 =3B =3B =3B =
=3B =3B 17460 =3B =3B =3B =3B =3B =3B =3 B&n=
bsp=3B =3B 0 =3B =3B =3B =3B =3B =3B =3B 16=
5 =3B =3B =3B =3B =3B 13850<br>-/+ buffers/cache: =
=3B =3B =3B =3B =3B =3B =3B 710 =3B =3B&nbs=
p=3B =3B =3B 31477<br>Swap: =3B =3B =3B =3B =3B=
 =3B =3B =3B 1983 =3B =3B =3B =3B =3B =
=3B =3B =3B =3B 0 =3B =3B =3B =3B =3B =
=3B 1983</div></blockquote><div><br>Hm=2C It looks weird.<br>BTW=2C I assum=
e that 24000 in "DETAIL: =3B Failed on request of size 24000" is size i=
n bytes=2C but may be it's size in kilobytes? o_O<br>
<br>How many connections (active and max) do you have?<br>Are you sure that=
nothing else could eat memory (e.g. some poorly-written cronjob?)<br>How m=
any VIRT memory does postmaster have before the crash?<br><br>Here is some =
suggersions:<br>
Check memory limits in /etc/security/limits.conf and in `ulimit -a`.<br>tai=
l /var/log/audit/audit.log (it might be something interesting there especia=
lly if you are running selinux)<br>Try to upgrade to 8.1.17 (it should be s=
afe and fast operation).<br>
Check your kernerl's shm settings.<br>Check fsm settings.<br><br>HTH<br></d=
iv></div><br clear=3D"all"><br>-- <br>Vladimir Rusinov<br><a href=3D"http:/=
/greenmice.info/">http://greenmice.info/</a><br>
<hr />=DAnete a la ce=
lebraci=F3n de Messenger <a href=3D'www.aniversariomessenger.com.mx' target=
=3D'_new'>y sigue siendo parte de esta historia</a></body>
</html>=

--_5fa4d650-63a5-4bda-8620-82567108ebfd_--
fabrixio1 [ Mo, 03 August 2009 02:17 ] [ ID #2010737 ]
Datenbanken » gmane.comp.db.postgresql.admin » out of memory

Vorheriges Thema: Question on start server using PG_CTL
Nächstes Thema: Error in creating the backend query