Search Postgresql Archives

Re: [INTERFACES] how to monitor dead connections to postgresql database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux