From: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
---|---|
To: | jing han <jing_han_66(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: [INTERFACES] how to monitor dead connections to postgresql database |
Date: | 2005-10-04 17:36:28 |
Message-ID: | 20051004173628.GQ40138@pervasive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-interfaces |
On Tue, Oct 04, 2005 at 06:21:51AM -0700, jing han wrote:
> Hello,
>
> After 6 days busy running, one of my process dead of
> cannot connect to database, and the log message shows
> that exceeding max_connections. The max_connections =
> 30.
>
> By running watch -d "ps ax |grep postgres" I only find
> 6 connections to database, there must be dead
> connections laying around and I cannot see them.
>
> Can you tell me how to monitor dead connections to
> postgres database?
This isn't the list for this type of question; moving to -general.
You can query from pg_stat_activity:
SELECT * FROM pg_stat_activity;
or
SELECT count(*) FROM pg_stat_activity;
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
From | Date | Subject | |
---|---|---|---|
Next Message | Richmond Dyes | 2005-10-04 18:14:28 | Advice on development environment for veritical product[VASCL:A105BF1C720] |
Previous Message | Scott Marlowe | 2005-10-04 16:26:03 | Re: export a select result in a file ? |
From | Date | Subject | |
---|---|---|---|
Next Message | Zlatko Matić | 2005-10-05 20:33:01 | Re: [INTERFACES] [ODBC] Unbound text box, Text > 255 characters, MSAccess/PostgreSQL |
Previous Message | Greg Campbell | 2005-10-04 13:34:14 | Re: [ODBC] Unbound text box, Text > 255 characters, MSAccess/PostgreSQL |