Runaway Instances of Postmaster
Runaway Instances of Postmaster
От:
"ccannick" <ccannick@gmail.com>
Дата:
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. On my other servers postmaster normally forks another process which is quickly renamed postgres: some service. I have dozens of postmasters running on the server and some are over 300 hours old. Any clues to this behavior would be appreciated. Thanks.
Re: Runaway Instances of Postmaster
От:
"Michael Swierczek" <mike.swierczek@gmail.com>
Дата:
On 5 Mar 2007 08:50:49 -0800, ccannick wrote: > 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 could be wrong, but I believe you need exclusive access to the database in order to perform a full vacuum. If someone was attempting a full vacuum while other connections to the database were active, that might explain your problem. I'm guessing that's unlikely, but I thought I would mention the possibility. -Mike
Re: Runaway Instances of Postmaster
От:
joseph speigle <joesp@sirfsup.com>
Дата:
> 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@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@www Mail]$
--
joe speigle
www.sirfsup.com