On 2011-01-12 13.13, zab08 wrote:
we have e test db server, we use jdbc to contect. but after a whie, The test db server can not accept connect. useps aux | grep postgrescommand : postgres 16904 0.0 0.0 46036 3948 ? S 17:03 0:00 /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data postgres 16906 0.0 0.0 46144 2192 ? Ss 17:03 0:00 postgres: writer process postgres 16907 0.0 0.0 46036 1088 ? Ss 17:03 0:00 postgres: wal writer process postgres 16908 0.0 0.0 46840 2072 ? Ss 17:03 0:00 postgres: autovacuum launcher process postgres 16909 0.0 0.0 14248 1012 ? Ss 17:03 0:00 postgres: stats collector process postgres 16910 0.0 0.0 46972 2992 ? Ss 17:03 0:00 postgres: postgres edu 172.29.0.40(40608) idle postgres 16911 0.0 0.0 46708 2656 ? Ss 17:03 0:00 postgres: postgres edu 172.29.0.40(40609) idle postgres 16912 0.0 0.0 46708 2628 ? Ss 17:03 0:00 postgres: postgres edu 172.29.0.40(40610) idle postgres 16913 0.0 0.0 46708 2628 ? Ss 17:03 0:00 postgres: postgres edu 172.29.0.40(40611) idle postgres 16914 0.0 0.0 46708 2632 ? Ss 17:03 0:00 postgres: postgres edu 172.29.0.40(40612) idle postgres 16915 0.0 0.0 46708 2636 ? Ss 17:03 0:00 postgres: postgres edu 172.29.0.40(40613) idle postgres 16916 0.0 0.0 46708 2632 ? Ss 17:03 0:00 postgres: postgres edu 172.29.0.40(40614) idle postgres 16917 0.0 0.1 47088 4136 ? Ss 17:03 0:00 postgres: postgres edu 172.29.0.40(40615) idle postgres 16918 0.0 0.1 47060 4236 ? Ss 17:03 0:00 postgres: postgres edu 172.29.0.40(40616) idle postgres 16919 0.0 0.1 47052 4136 ? Ss 17:03 0:02 postgres: postgres edu 172.29.0.40(40617) idle postgres 21619 0.0 0.0 46708 2636 ? Ss 19:43 0:00 postgres: postgres edu 172.29.0.40(38803) idle postgres 21620 0.0 0.0 46708 2636 ? Ss 19:43 0:00 postgres: postgres edu 172.29.0.40(38804) idle postgres 21621 0.0 0.0 46708 2640 ? Ss 19:43 0:00 postgres: postgres edu 172.29.0.40(38805) idle postgres 21622 0.0 0.0 46708 2644 ? Ss 19:43 0:00 postgres: postgres edu 172.29.0.40(38806) idle postgres 21623 0.0 0.0 46708 2644 ? Ss 19:43 0:00 postgres: postgres edu 172.29.0.40(38807) idle postgres 21624 0.0 0.0 46708 2636 ? Ss 19:43 0:00 postgres: postgres edu 172.29.0.40(38808) idle postgres 21625 0.0 0.0 46708 2640 ? Ss 19:43 0:00 postgres: postgres edu 172.29.0.40(38809) idle postgres 21626 0.0 0.0 46708 2644 ? Ss 19:43 0:00 postgres: postgres edu 172.29.0.40(38810) idle postgres 21627 0.0 0.0 46708 2640 ? Ss 19:43 0:00 postgres: postgres edu 172.29.0.40(38811) idle postgres 21628 0.0 0.1 47104 4836 ? Ss 19:43 0:00 postgres: postgres edu 172.29.0.40(38812) INSERT
Seems like your application never disconnect. Continously creating new connections without disconnecting previously made ones will eventually exhaust the number of connections configured.
... kill -9 pidcommand to kill all of them in the past? and the test db server is shut down. how to analyze the reason of these? and how to solve?
-- Regards, Robert "roppert" Gravsjà -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general