Re: Runaway Instances of Postmaster

From: joseph speigle <joesp(at)sirfsup(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Runaway Instances of Postmaster
Date: 2007-03-09 01:52:18
Message-ID: 20070309015218.GA10552@www.sirfsup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

> I'm running v8.0 on Linux and am seeing the following phenomenon:
>
> With each connection, I get more and more postmasters running that
> never complete, die, or timeout. Eventually all of my memory is
> depleted and the system is severely hampered.

I have the same problem.

I don't know why I have so many.
I am running mod_perl but in the startup script which is read by httpd (apache server) I have

Apache::DBI->connect_on_init ( "DBI:Pg:dbname=web_db", "web_acct", "web_passwd", { PrintError => 1, RaiseError => 0, AutoCommit => 1});

but I should only start 5 connections and pool them.

I start with 5 of them...

1. I wonder if this an Apache::DBI issue?
2. I also wonder if there is a postgres command to clear them up without restarting the postmaster?

the longer the machine is up the more connections are 'idle'

[joe(at)www Mail]$ ps -aux | grep post
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.5/FAQ
postgres 2228 0.0 0.2 20424 3072 ? S Mar08 0:02 /usr/local/pg8.1/bin/postmaster -D web_db
postgres 2234 0.0 0.4 20560 4688 ? S Mar08 0:00 postgres: writer process
postgres 2235 0.0 0.2 11212 2580 ? S Mar08 0:00 postgres: stats buffer process
postgres 2236 0.0 0.2 10440 2252 ? S Mar08 0:00 postgres: stats collector process
postgres 17604 0.0 0.4 20840 4216 ? S Mar08 0:00 postgres: web_acct web_db [local] idle
postgres 17606 0.0 0.4 20840 4216 ? S Mar08 0:00 postgres: web_acct web_db [local] idle
postgres 17610 0.0 0.4 20840 4216 ? S Mar08 0:00 postgres: web_acct web_db [local] idle
postgres 17611 0.0 0.4 20840 4216 ? S Mar08 0:00 postgres: web_acct web_db [local] idle
postgres 17612 0.0 0.4 20840 4216 ? S Mar08 0:00 postgres: web_acct web_db [local] idle
postgres 17615 0.0 0.4 20840 4216 ? S Mar08 0:00 postgres: web_acct web_db [local] idle
postgres 17741 0.0 0.9 21760 9716 ? S Mar08 0:00 postgres: web_acct web_db 127.0.0.1(54578) idle
postgres 17742 0.0 1.2 21216 12568 ? S Mar08 0:01 postgres: web_acct web_db [local] idle
postgres 17866 0.0 0.7 21828 7748 ? S Mar08 0:00 postgres: web_acct web_db 127.0.0.1(42312) idle
postgres 17867 0.0 1.2 21208 12584 ? S Mar08 0:01 postgres: web_acct web_db [local] idle
postgres 17932 0.0 1.0 21756 11148 ? S Mar08 0:00 postgres: web_acct web_db 127.0.0.1(42332) idle
postgres 17933 0.0 1.2 21208 12616 ? S Mar08 0:02 postgres: web_acct web_db [local] idle
postgres 17946 0.0 0.7 21292 7960 ? S Mar08 0:00 postgres: web_acct web_db 127.0.0.1(42340) idle
postgres 17947 0.0 1.2 21208 12636 ? S Mar08 0:02 postgres: web_acct web_db [local] idle
postgres 18291 0.0 0.4 20840 4216 ? S Mar08 0:00 postgres: web_acct web_db [local] idle
postgres 18743 0.0 0.9 21768 10104 ? S Mar08 0:00 postgres: web_acct web_db 127.0.0.1(50653) idle
postgres 18744 0.0 1.2 21236 12592 ? S Mar08 0:01 postgres: web_acct web_db [local] idle
postgres 18832 0.0 0.8 21244 8408 ? S Mar08 0:00 postgres: web_acct web_db 127.0.0.1(45343) idle
postgres 18833 0.0 1.2 21208 12592 ? S Mar08 0:01 postgres: web_acct web_db [local] idle
postgres 19079 0.0 0.4 20840 4212 ? S Mar08 0:00 postgres: web_acct web_db [local] idle
postgres 19080 0.0 0.8 21828 8420 ? S Mar08 0:00 postgres: web_acct web_db 127.0.0.1(42410) idle
postgres 19081 0.0 1.2 21216 12584 ? S Mar08 0:02 postgres: web_acct web_db [local] idle
postgres 19283 0.0 0.8 21824 8656 ? S Mar08 0:00 postgres: web_acct web_db 127.0.0.1(33292) idle
postgres 19284 0.0 1.2 21216 12556 ? S Mar08 0:01 postgres: web_acct web_db [local] idle
postgres 23309 0.0 0.4 20840 4224 ? S Mar08 0:00 postgres: web_acct web_db [local] idle
postgres 23412 0.0 0.7 21316 8160 ? S Mar08 0:00 postgres: web_acct web_db 127.0.0.1(39644) idle
postgres 23513 0.0 1.2 21208 12636 ? S Mar08 0:01 postgres: web_acct web_db [local] idle
postgres 6888 0.0 0.4 20840 4224 ? S 07:59 0:00 postgres: web_acct web_db [local] idle
postgres 7154 0.0 0.6 21232 6320 ? S 08:12 0:00 postgres: web_acct web_db 127.0.0.1(38491) idle
postgres 7155 0.0 1.0 21208 10888 ? S 08:12 0:00 postgres: web_acct web_db [local] idle
joe 10651 0.0 0.0 4856 740 pts/1 R+ 10:43 0:00 grep post
[joe(at)www Mail]$

--
joe speigle
www.sirfsup.com

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message joseph speigle 2007-03-09 02:31:57 Re: Help with creating Documentation
Previous Message joseph speigle 2007-03-09 01:06:12 Re: Help with creating Documentation