pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Too many clients----A big problem for my team
5+ messages / 4 participants
[nested] [flat]

* Too many clients----A big problem for my team
@ 2005-03-07 13:08 ganapatiram <ganapatiram@symphonydata.com>
  2005-03-08 05:41 ` Re: Too many clients----A big problem for my team Thomas F.O'Connell <tfo@sitening.com>
  2005-03-08 16:49 ` Re: Too many clients----A big problem for my team Steve Crawford <scrawford@pinpointresearch.com>
  2005-03-09 11:33 ` Re: Too many clients----A big problem for my team Daniel Rubio <drubior@tinet.org>
  0 siblings, 3 replies; 5+ messages in thread

From: ganapatiram @ 2005-03-07 13:08 UTC (permalink / raw)
  To: pgsql-admin

Hi Experts,

           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



when i do trial and error changes i see this error differently but the essense of the error remains same. 



        I have max_connections=200 and i have 5 users for my DB. I dont understand what to do in order to resolve this. Please suggest me something by which i can overcome this problem. I referred few threads but none of them are of my case. 





Waiting for your valuable suggestion..........









Thanks and Regards

Ram

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

* Re: Too many clients----A big problem for my team
  2005-03-07 13:08 Too many clients----A big problem for my team ganapatiram <ganapatiram@symphonydata.com>
@ 2005-03-08 05:41 ` Thomas F.O'Connell <tfo@sitening.com>
  2 siblings, 0 replies; 5+ messages in thread

From: Thomas F.O'Connell @ 2005-03-08 05:41 UTC (permalink / raw)
  To: ganapatiram <ganapatiram@symphonydata.com>; +Cc: pgsql-admin

Well, first of all, max_connections can only be set at server start. 
Are you restarting postgres when you do "trial and error changes"?

Secondly, 5 users can still manage to make multiple connections. You 
can use ps to see how many connections are active at any given time.

http://www.postgresql.org/docs/8.0/static/monitoring.html#MONITORING-PS

-tfo

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Mar 7, 2005, at 7:08 AM, ganapatiram wrote:

> Hi Experts,
>  
>            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
>
>  
>
> when i do trial and error changes i see this error differently but the 
> essense of the error remains same.
>
>   
>
>         I have max_connections=200 and i have 5 users for my DB. I 
> dont understand what to do in order to resolve this. Please suggest me 
> something by which i can overcome this problem. I referred few threads 
> but none of them are of my case.
>
>   
>
>  
>
> Waiting for your valuable suggestion..........
>
>  
>
>  
>
>  
>
>  
>
> Thanks and Regards
>
> Ram




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

* Re: Too many clients----A big problem for my team
  2005-03-07 13:08 Too many clients----A big problem for my team ganapatiram <ganapatiram@symphonydata.com>
@ 2005-03-08 16:49 ` Steve Crawford <scrawford@pinpointresearch.com>
  2005-03-18 16:24   ` Re: Too many clients----A big problem for my team Steve Crawford <scrawford@pinpointresearch.com>
  2 siblings, 1 reply; 5+ messages in thread

From: Steve Crawford @ 2005-03-08 16:49 UTC (permalink / raw)
  To: ganapatiram <ganapatiram@symphonydata.com>; 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



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

* Re: Too many clients----A big problem for my team
  2005-03-07 13:08 Too many clients----A big problem for my team ganapatiram <ganapatiram@symphonydata.com>
  2005-03-08 16:49 ` Re: Too many clients----A big problem for my team Steve Crawford <scrawford@pinpointresearch.com>
@ 2005-03-18 16:24   ` Steve Crawford <scrawford@pinpointresearch.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Steve Crawford @ 2005-03-18 16:24 UTC (permalink / raw)
  To: pgsql-admin; +Cc: ganapatiram <ganapatiram@symphonydata.com>

On Friday 18 March 2005 5:31 am, ganapatiram wrote:
> Hi Mr. Steeve,
>
>             I really thank for your detailed reply. I worked on the
> four points what you mentioned. I am sure it worked. But when i
> went for testing i saw a different error this time. It says:
>
> org.jboss.util.NestedSQLException: No ManagedConnections available
> within configured blocking timeout ( 1000 [ms] ); - nested
> throwable: (javax.resource.ResourceException: No ManagedConnections
> available within configured blocking timeout ( 1000 [ms] ))
>
>         Here i tried by changing the " blocking-timeout-millis" to
> 30000. Even that did not work i am getting the same error. Please
> let me know your suggestion in this regard.
>
> Once again thanks for your reply.

You need to diagnose what is happening and reply to the list with your 
findings. In particular, when you get this message you need to check 
your PostgreSQL server and see how many connections it is handling.

Naturally you should first make sure the problem app/client can 
connect once. If not, there may be a config or coding problem. Make 
sure that you can connect from that machine using psql. Note and 
report any error messages.

Your postgresql log file may yield clues as well.

When you are having the problem see if you can connect with psql from 
the problem machine and from other known good machines. If you can, 
the problem is probably somewhere in the code or configuration of 
your application or Jboss so you will have to work internally or ask 
on the Jboss groups.

If you can't connect, check the number of connections on the PG server 
("ps -ef | grep postgres:" works on my server and also shows the IP 
of each connecting client). If you are choked with lots of idle 
connections you may have to track them down. You can use netstat on 
the server to find the client-side port number for each of the 
connections and on the clients you can use lsof, fuser or similar to 
locate the specific process associated with each connection. That 
still leaves you with determining why the connections are there which 
will again probably be a question for Jboss or your developers.

Cheers,
Steve




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

* Re: Too many clients----A big problem for my team
  2005-03-07 13:08 Too many clients----A big problem for my team ganapatiram <ganapatiram@symphonydata.com>
@ 2005-03-09 11:33 ` Daniel Rubio <drubior@tinet.org>
  2 siblings, 0 replies; 5+ messages in thread

From: Daniel Rubio @ 2005-03-09 11:33 UTC (permalink / raw)
  To: pgsql-admin

I had the same problem a few weeks ago.

Was happening that our developers using Tomcat, were using connection 
pools, and stoping and restarting their aplications which causes to 
leave these connection opened and opening some new.

Look in the servlet engine (or what they use) for the number of 
connections they made (in Tomcat it's a parameter), say them not to 
leave the connections opened, and not to stop and restart the java 
application when they make changes, they must restart the "engine" (it 
closes all the opened connections).

It worked for me ...

ganapatiram wrote:

> Hi Experts,
>  
>            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*
> 
> ** 
> 
> *when i do trial and error changes i see this error differently but the 
> essense of the error remains same. *
> 
> ** 
> 
> *        *I have max_connections=200 and i have 5 users for my DB. I 
> dont understand what to do in order to resolve this. Please suggest me 
> something by which i can overcome this problem. I referred few threads 
> but none of them are of my case.
> 
>  
> 
>  
> 
> Waiting for your valuable suggestion..........
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Thanks and Regards
> 
> Ram
> 


-- 
********************************************************
Daniel Rubio Rodríguez
OASI (Organisme Autònom Per la Societat de la Informació)
c/ Assalt, 12
43003 - Tarragona
Tef.: 977.244.007 - Fax: 977.224.517
e-mail: drubio a oasi.org
********************************************************




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


end of thread, other threads:[~2005-03-18 16:24 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-07 13:08 Too many clients----A big problem for my team ganapatiram <ganapatiram@symphonydata.com>
2005-03-08 05:41 ` Thomas F.O'Connell <tfo@sitening.com>
2005-03-08 16:49 ` Steve Crawford <scrawford@pinpointresearch.com>
2005-03-18 16:24   ` Steve Crawford <scrawford@pinpointresearch.com>
2005-03-09 11:33 ` Daniel Rubio <drubior@tinet.org>

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