pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Usama Dar <munir.usama@gmail.com>
To: Tena Sakai <tsakai@gallo.ucsf.edu>
Cc: Jonah H. Harris <jonah.harris@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: connection limit exceeded
Date: Sat, 1 Dec 2007 02:24:41 +0500
Message-ID: <ff0e67090711301324y604fb9cej9823c88ab2dec13d@mail.gmail.com> (raw)
In-Reply-To: <FE44E0D7EAD2ED4BB2165071DB8E328C03062DF0@egcrc-ex01.egcrc.org>
References: <FE44E0D7EAD2ED4BB2165071DB8E328C03062DED@egcrc-ex01.egcrc.org>
	<36e682920711301203g7fdb1b81vc7d2bbb2e4018827@mail.gmail.com>
	<FE44E0D7EAD2ED4BB2165071DB8E328C03062DF0@egcrc-ex01.egcrc.org>

On Dec 1, 2007 1:34 AM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:

>  Hi Jonah,
>
> Many thanks!
>
> >>  2) how would I look at the "open/used" connections?
> > select * from pg_stat_activity;
>
> This is a wonderful view!  How would I properly terminate
> these (of course there are 99 of them!) these query process?
> Should I do this from unix or is there any postgres tool I
> can use?
>

try pg_cancel_backend(pid)

>
>
> Thank you.
>
> Regards,
>
> Tena Sakai
> tsakai@gallo.ucsf.edu
>
>
>
> -----Original Message-----
> From: Jonah H. Harris [mailto:jonah.harris@gmail.com<jonah.harris@gmail.com>
> ]
> Sent: Fri 11/30/2007 12:03 PM
> To: Tena Sakai
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] connection limit exceeded
>
> On Nov 30, 2007 2:55 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> >  On my postgres 8.1.1, I get a response
> >    psql: FATAL:  connection limit exceeded for non-superusers
>
> >  1) Is this to do with max_connections setting in the postgres
> >     configuration file?  (my setting is 100 (I think this is the
> >     default).)
>
> Yep.
>
> >  2) how would I look at the "open/used" connections?
>
> select * from pg_stat_activity;
>
> >  3) should I try restarting postgres without changing the setting?
>
> Has to be restarted for change to take effect.
>
> >  4) what repercussion would there be if I increase this number to,
> >     say, 200? (and would that be a good idea?)
>
> A little overhead, nothing bad.
>
> >  5) finally, what's the best fix?  (Do I need to go to pgpool?)
>
> see pgbouncer
>
> --
> Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
> EnterpriseDB Corporation                | fax: 732.331.1301
> 499 Thornall Street, 2nd Floor          | jonah.harris@enterprisedb.com
> Edison, NJ 08837                        | http://www.enterprisedb.com/
>
>


-- 
Usama Munir Dar http://linkedin.com/in/usamadar
Consultant Architect
Cell:+92 321 5020666
Skype: usamadar

view thread (10+ messages)  latest in thread

Message-ID: <ff0e67090711301324y604fb9cej9823c88ab2dec13d@mail.gmail.com>
Permalink:  ../ff0e67090711301324y604fb9cej9823c88ab2dec13d@mail.gmail.com/
Also on:    postgresql.org/message-id/ff0e67090711301324y604fb9cej9823c88ab2dec13d@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: munir.usama@gmail.com, tsakai@gallo.ucsf.edu, jonah.harris@gmail.com
  Subject: Re: connection limit exceeded
  In-Reply-To: <ff0e67090711301324y604fb9cej9823c88ab2dec13d@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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