pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
how to monitor dead connections to postgresql database
2+ messages / 2 participants
[nested] [flat]

* how to monitor dead connections to postgresql database
@ 2005-10-04 13:21  jing han <jing_han_66@yahoo.com>
  0 siblings, 1 reply; 2+ messages in thread

From: jing han @ 2005-10-04 13:21 UTC (permalink / raw)
  To: pgsql-interfaces

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?


Thank you!

jing


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [INTERFACES] how to monitor dead connections to postgresql database
@ 2005-10-04 17:36  Jim C. Nasby <jnasby@pervasive.com>
  parent: jing han <jing_han_66@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Jim C. Nasby @ 2005-10-04 17:36 UTC (permalink / raw)
  To: jing han <jing_han_66@yahoo.com>; +Cc: pgsql-general@postgresql.org

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@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-10-04 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-04 13:21 how to monitor dead connections to postgresql database jing han <jing_han_66@yahoo.com>
2005-10-04 17:36 ` Jim C. Nasby <jnasby@pervasive.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox