pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Crawford <scrawford@pinpointresearch.com>
To: ganapatiram <ganapatiram@symphonydata.com>
To: pgsql-admin@postgresql.org
Subject: Re: Too many clients----A big problem for my team
Date: Tue, 8 Mar 2005 08:49:18 -0800
Message-ID: <200503080849.18471.scrawford@pinpointresearch.com> (raw)
In-Reply-To: <003101c52316$bd8e4f00$8c0aa8c0@rram>
References: <003101c52316$bd8e4f00$8c0aa8c0@rram>

>            I work with postgresql 8.0 version. I have a team of 14
> developers. When all the team connects the DB i see this error very
> very frequently which is a severe problem for me and team all the
> day. The error is:
>
> Please report this exception: java.sql.SQLException: FATAL:  sorry,
> too many clients already
...
>         I have max_connections=200 and i have 5 users for my DB. I
> dont understand what to do in order to resolve this...

What is your _server_ telling you?

Check the logs.

Check ps for instances of postgres.

Check netstat for connections to PG and track back to the source point 
of each of the connections.

Keep a connection open to your server so you can run "select * from 
pg_stat_activity;" to see what queries are running.

You will probably find:

1) Your app is lying to you or is connecting to a different server 
than you assumed if you have multiple servers.

2) You don't really have 200 connections (did you restart after 
changing your config?)

3) Your app is making more connections than you think. (Doing any 
pooling??)

4) Your apps aren't closing connections that you thought were being 
closed.

Cheers,
Steve



view thread (5+ messages)  latest in thread

Message-ID: <200503080849.18471.scrawford@pinpointresearch.com>
Permalink:  ../200503080849.18471.scrawford@pinpointresearch.com/
Also on:    postgresql.org/message-id/200503080849.18471.scrawford@pinpointresearch.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: scrawford@pinpointresearch.com, ganapatiram@symphonydata.com
  Subject: Re: Too many clients----A big problem for my team
  In-Reply-To: <200503080849.18471.scrawford@pinpointresearch.com>
  References: <003101c52316$bd8e4f00$8c0aa8c0@rram> <200503080849.18471.scrawford@pinpointresearch.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