Re: Too many clients----A big problem for my team

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: "ganapatiram" <ganapatiram(at)symphonydata(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Too many clients----A big problem for my team
Date: 2005-03-08 16:49:18
Message-ID: 200503080849.18471.scrawford@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Joel Fradkin 2005-03-08 18:57:37 graphical tools
Previous Message Scott Marlowe 2005-03-08 13:59:25 Re: help!!!!!!