pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
connection limit exceeded
10+ messages / 6 participants
[nested] [flat]

* connection limit exceeded
@ 2007-11-30 19:55  Tena Sakai <tsakai@gallo.ucsf.edu>
  0 siblings, 1 reply; 10+ messages in thread

From: Tena Sakai @ 2007-11-30 19:55 UTC (permalink / raw)
  To: pgsql-admin

Hi Everybody,

On my postgres 8.1.1, I get a response
  psql: FATAL:  connection limit exceeded for non-superusers

A few questions come to mind...

1) Is this to do with max_connections setting in the postgres
   configuration file?  (my setting is 100 (I think this is the
   default).) 
2) how would I look at the "open/used" connections?
3) should I try restarting postgres without changing the setting?
4) what repercussion would there be if I increase this number to,
   say, 200? (and would that be a good idea?)
5) finally, what's the best fix?  (Do I need to go to pgpool?)

Many thanks in advance.

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu

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

* Re: connection limit exceeded
@ 2007-11-30 20:03  Jonah H. Harris <jonah.harris@gmail.com>
  parent: Tena Sakai <tsakai@gallo.ucsf.edu>
  0 siblings, 2 replies; 10+ messages in thread

From: Jonah H. Harris @ 2007-11-30 20:03 UTC (permalink / raw)
  To: Tena Sakai <tsakai@gallo.ucsf.edu>; +Cc: pgsql-admin

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/



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

* Re: connection limit exceeded
@ 2007-11-30 20:34  Tena Sakai <tsakai@gallo.ucsf.edu>
  parent: Jonah H. Harris <jonah.harris@gmail.com>
  1 sibling, 2 replies; 10+ messages in thread

From: Tena Sakai @ 2007-11-30 20:34 UTC (permalink / raw)
  To: Jonah H. Harris <jonah.harris@gmail.com>; +Cc: pgsql-admin

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?

Thank you.

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu



-----Original Message-----
From: Jonah H. Harris [mailto: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/

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

* Re: connection limit exceeded
@ 2007-11-30 20:43  Gergely CZUCZY <phoemix@harmless.hu>
  parent: Jonah H. Harris <jonah.harris@gmail.com>
  1 sibling, 0 replies; 10+ messages in thread

From: Gergely CZUCZY @ 2007-11-30 20:43 UTC (permalink / raw)
  To: Jonah H. Harris <jonah.harris@gmail.com>; +Cc: Tena Sakai <tsakai@gallo.ucsf.edu>; pgsql-admin

Hi,

I also have this issue (I'm using 8.2.4), but whenever this happens
I see only a few (4-6) postgresql processes in the system, and my
connection limit is set to 128. Kinda strange. Next time when I
notice it I will check pg_stat_activity and report back.

On Fri, Nov 30, 2007 at 03:03:31PM -0500, Jonah H. Harris wrote:
> 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/

Sincerely,

Gergely Czuczy
mailto: gergely.czuczy@harmless.hu

-- 
Weenies test. Geniuses solve problems that arise.

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

* Re: connection limit exceeded
@ 2007-11-30 21:17  Jonah H. Harris <jonah.harris@gmail.com>
  parent: Tena Sakai <tsakai@gallo.ucsf.edu>
  1 sibling, 1 reply; 10+ messages in thread

From: Jonah H. Harris @ 2007-11-30 21:17 UTC (permalink / raw)
  To: Tena Sakai <tsakai@gallo.ucsf.edu>; +Cc: pgsql-admin

On Nov 30, 2007 3:34 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
>  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?

pg_cancel_backend will cancel a query on them.  As for killing the
process itself, use:

kill -TERM

-- 
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/



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

* Re: connection limit exceeded
@ 2007-11-30 21:24  Usama Dar <munir.usama@gmail.com>
  parent: Tena Sakai <tsakai@gallo.ucsf.edu>
  1 sibling, 1 reply; 10+ messages in thread

From: Usama Dar @ 2007-11-30 21:24 UTC (permalink / raw)
  To: Tena Sakai <tsakai@gallo.ucsf.edu>; +Cc: Jonah H. Harris <jonah.harris@gmail.com>; pgsql-admin

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

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

* Re: connection limit exceeded
@ 2007-11-30 21:27  Tena Sakai <tsakai@gallo.ucsf.edu>
  parent: Jonah H. Harris <jonah.harris@gmail.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Tena Sakai @ 2007-11-30 21:27 UTC (permalink / raw)
  To: Jonah H. Harris <jonah.harris@gmail.com>; +Cc: pgsql-admin

Many thanks, Jonah!

Tena Sakai
tsakai@gallo.ucsf.edu


-----Original Message-----
From: Jonah H. Harris [mailto:jonah.harris@gmail.com]
Sent: Fri 11/30/2007 1:17 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] connection limit exceeded
 
On Nov 30, 2007 3:34 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
>  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?

pg_cancel_backend will cancel a query on them.  As for killing the
process itself, use:

kill -TERM

-- 
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/

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

* Re: connection limit exceeded
@ 2007-11-30 21:28  Tena Sakai <tsakai@gallo.ucsf.edu>
  parent: Usama Dar <munir.usama@gmail.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Tena Sakai @ 2007-11-30 21:28 UTC (permalink / raw)
  To: Usama Dar <munir.usama@gmail.com>; +Cc: Jonah H. Harris <jonah.harris@gmail.com>; pgsql-admin

Many thanks, Usama!

Tena Sakai
tsakai@gallo.ucsf.edu


-----Original Message-----
From: Usama Dar [mailto:munir.usama@gmail.com]
Sent: Fri 11/30/2007 1:24 PM
To: Tena Sakai
Cc: Jonah H. Harris; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] connection limit exceeded
 
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

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

* Connection Limit Exceeded
@ 2008-12-09 23:10  Steve Kecskes <steve@outtalimits.com.au>
  0 siblings, 1 reply; 10+ messages in thread

From: Steve Kecskes @ 2008-12-09 23:10 UTC (permalink / raw)
  To: pgsql-admin

Hi,

Just wondering what actually happens when the connection limit exceeds.

Dec 10 05:19:45 pallas1 postgres[373]: [2-1] FATAL:  connection limit
exceeded for non-superusers

Are the requests that are rejected pooled and processed when connection
slots are available?




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

* Re: Connection Limit Exceeded
@ 2008-12-10 01:02  Scott Marlowe <scott.marlowe@gmail.com>
  parent: Steve Kecskes <steve@outtalimits.com.au>
  0 siblings, 0 replies; 10+ messages in thread

From: Scott Marlowe @ 2008-12-10 01:02 UTC (permalink / raw)
  To: Steve Kecskes <steve@outtalimits.com.au>; +Cc: pgsql-admin

On Tue, Dec 9, 2008 at 4:10 PM, Steve Kecskes <steve@outtalimits.com.au> wrote:
> Hi,
>
> Just wondering what actually happens when the connection limit exceeds.
>
> Dec 10 05:19:45 pallas1 postgres[373]: [2-1] FATAL:  connection limit
> exceeded for non-superusers
>
> Are the requests that are rejected pooled and processed when connection
> slots are available?

Nope they're refused and you have to come back at a later time and try again.



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


end of thread, other threads:[~2008-12-10 01:02 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-11-30 19:55 connection limit exceeded Tena Sakai <tsakai@gallo.ucsf.edu>
2007-11-30 20:03 ` Jonah H. Harris <jonah.harris@gmail.com>
2007-11-30 20:34   ` Tena Sakai <tsakai@gallo.ucsf.edu>
2007-11-30 21:17     ` Jonah H. Harris <jonah.harris@gmail.com>
2007-11-30 21:27       ` Tena Sakai <tsakai@gallo.ucsf.edu>
2007-11-30 21:24     ` Usama Dar <munir.usama@gmail.com>
2007-11-30 21:28       ` Tena Sakai <tsakai@gallo.ucsf.edu>
2007-11-30 20:43   ` Gergely CZUCZY <phoemix@harmless.hu>
2008-12-09 23:10 Connection Limit Exceeded Steve Kecskes <steve@outtalimits.com.au>
2008-12-10 01:02 ` Re: Connection Limit Exceeded Scott Marlowe <scott.marlowe@gmail.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