Title: RE: [JBoss-user] database conn pool
Thanks. That was indeed the case. I was not closing the connection and it was getting piled up.

Mir
 
----- Original Message -----
Sent: Thursday, October 18, 2001 12:11 PM
Subject: RE: [JBoss-user] database conn pool

May be you are not closing properly your connections, which mean that the connection are not putback into the pool, so JBoss will open more and more connection.

Check your code and make sure that ALL the cnn.close() are in a finally block:

ex:
Connection cnn = null
try
{
   cnn = getConnection(); //get the connection

   // consume the connection
   ...
}
catch( Exception x )
{
 // Error handing here
}
finally
{
  if ( cnn != null )
  {
        try{    cnn.close(); }catch( Exception e )      {}
  }
}

-----Original Message-----
From: Mir S Islam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 2:20 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] database conn pool


Is it configurable on how many connections can stay in the pool ? I am
running into problem with jboss with postgres at the backend. After using
some jsp pages which queries some stateless ejb postgres starts giving error
about too many clients conencted and refuses farther connections from jboss.
However in reality there is only one web browser connecting to jboss/tomcat
server. So to me it seemed like that jboss was not reusing the previously
opened connections from the pool. If I do netstat on the machine I do see
several connections open to postgres. The pool in tomcat is set for 10 min
clients in tomcat.properties (I did not see a max client entry).

I have tried increasing postgres concurrent connections to 100 and still it
hit that limit within a few minutes.


Thanks
Mir


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to