DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28211>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28211





------- Additional Comments From [EMAIL PROTECTED]  2005-06-26 00:25 -------
[snip]
> This is particularly relevant for MySQL Connector/J 3.0.x which tries to 
apply 
> some weird automatic recovery when a MySQL connection has timed out, 
resulting 
> in all sorts of issues. 

Juergen,

By _default_ Connector/J doesn't do any "automatic recovery" because of the 
issues you speak of. Unfortunately just about every FAQ and third-party 
component has decided to latch on to using autoReconnect=true instead of 
dealing with the real issue of handling stale connections, which is the same 
for _any_ JDBC vendor (i.e. either have the pool test connections before 
handing them out and take the performance hit, or do the "right" thing and 
actually handle SQLExceptions, because that's why they exist).

> The best way to deal with this is to set the maximum 
> lifetime of a connection to 4 hours or the like: If it's older, simply kill 

Most people running MySQL in heavy-load production set it to a few _seconds_, 
because it only takes a few ms to create a connection, but an idle connection 
takes resources that could be used by some other active process.

Unfortunately, as you note, DBCP has no straightforward way to enforce a max-
connection lifetime or idle period, so you have to use maxIdle connections as 
a "crutch" of sorts (other pools such as Proxool (as you mention) or C3P0 have 
these features).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to