You have database specific solutions for this. (but the checkOnBorrow will do just fine)
If you think there is an overload then you can monitor the number of active/idle connections. Normally the checkOnBorrow shouldn't be a problem.
I assume you are using DBCP 1.1. In the latest nightly build there is one performance improvement related to the validationQuery. If you have a performance bottleneck with the validationQuery and it goes away when you don't do any tests then you can try a nightly build.
-- Dirk
raj wrote:
Thanks very much Dirk, I am closing connections every where. I am trying to find leaks but could not as our testing environment works fine performance and other. In production We are seeing performance issues which are effecting customers.
Here are my speculations -- 1)Firewal may be dropping connections-- 2)Some other source creating stale(bad) connections but Connection pool not dropping 3)Some connections are Active for long time (Not source code issue -Might be some other reason.
We are using validationQuery along with checkOnReturn and CheckOnBorrow(I forgot exact names)..
1)I do I check leaks -- 2)Does check on Borrow causes over load on connection pool 3)If checkonreturn is there then why checkOnBorrow(Whats the reason for using both--Unless there is huge difference)...(I know one validates when connection is returned and one when connection is borrowed.
Some time A bad connection which is Active in terms of COnnection POol will become stale connection by Firewall after 60Min and then will be returned to connection pool and validated and then eventually dropped as validation fails..
Do we have to wait for 60 min till firewall returns or is there any way we can validate in between(DB perspective atleast)..
Sorry for asking too many questions ..I appreciate your(ANy ones) time and help.
Thanks a bunch.. --- Dirk Verbeeck <[EMAIL PROTECTED]> wrote:
The parameter you are looking for is---------------------------------------------------------------------
"validationQuery" and then enable one of the connection validation tests.
This only helps when you are getting SQLExceptions
about broken connections.
If you run out of connection because they aren't
closed everywhere then you have to look for the leak.
-- Dirk
raj wrote:
Hi, Thanks for information in advance. I am running into an issue where some bad
connections
are hanging not getting closed and eventually
going
away once I restart the server.
Problem is some times there are too many effecting performance.
I am closing all the connections in the code. I am using poolingDataSource.
Is there any parameter in DBCP which will
determine
whether an ACTIVE connection is valid or not and
then
if not close the connection without effecting
other
Active connections...
Some thing like Using For How much time this connection is Active..
Thanks for the help. Regards..RAJ
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
