commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holly, Michael" <mho...@talisentech.com>
Subject RE: DBCP POOL -Connection Pool giving nullpointer -->Unable to intialize -->Crashing
Date Wed, 05 May 2004 13:43:29 GMT
I have experienced a situation where a firewall was setup in between my
server and the database server.  The firewall set to timeout sessions
after a certain amount of inactivity.  In this case the pool still
thought the connection was valid.  So the query would start and go
forever because my pool was set to wait indefinitely for the return.
Now I use a keep alive query and valid timeout value.

Hope this helps

Michael

-----Original Message-----
From: Geeta Ramani [mailto:gramani@terralink.com] 
Sent: Wednesday, May 05, 2004 7:51 AM
To: Jakarta Commons Users List
Subject: RE: DBCP POOL -Connection Pool giving nullpointer -->Unable to
intialize -->Crashing


Raj:

A *lot* of connection pool problems arise due to not returning
connections to the pool properly (ie. in a finally block). I know you
say that the code has not changed and therefore this cannot be the case,
but carry out this experiment: Get the application working on a test
machine - or your local machine - and and *set the pool size to 1*. Then
test your application by clicking on various links and submit buttons
and what not. You may very well come across a submit for which you wait
indefintely. Look at the corresponding code - chances are either a
statement is not closed, a result set is not closed, or (most likely) a
connection is not closed in a **finally** block. In fact that may very
well explain why you are having this problem all of a sudden: you may
not have changed your code, but the data in the database may have
changed - resulting in a query which does not succeed. So if your code
closed the connection within the try block rather than in a finally
block, then that connection may never be getting released. So when all
the connections are "used up", you may well be having to wait
indefintely.. Well, worth a shot anyways..:)

Regards,
Geeta

> -----Original Message-----
> From: raj [mailto:rajshiri@yahoo.com]
> Sent: Wednesday, May 05, 2004 1:54 AM
> To: Jakarta Commons Users List
> Subject: DBCP POOL -Connection Pool giving nullpointer -->Unable to 
> intialize -->Crashing
> 
> 
> Hello,
> We have been using jakarta pool implementation with
> JRUN for past 6 months and worked fine until last
> week.
> Started giving this error.
> 
> Works fine for couple of hours and starts crashing and
> had to restart JRUN every time.
> 
> Explanation from our admin -->
> Load on database causing delay in getting connection
> from connection pool which is becoming stale after
> trying to get connection for long time.
> I did not like this explanation as nothing changed and started 
> suddenly.>


 
> THANKS very much--
> RAJ
> 
> > 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message