Hi Steven,
MySQL is the only database that behaves like this I think, and it's
very frustrating. If you Google for the errors, you'll see that a lot
of connection pools have problems with it. Steven, would it be
possible for you to change your scheduler task and simply clean the
connection pool instead. This should only be one or two lines of
code. I don't have any application running with MySQL, so it's
difficult for me to test if this fix actually behaves correctly.
Thanks for the help!
Geert
On 28 Sep 2006, at 18:33, Steven Grimm wrote:
Postgres and Oracle, at least, don't close client connections.
Maybe they can be configured to do so, but by default they don't.
The onus is on the clients to be well-behaved. Honestly I think the
only reason MySQL closes connections by default is because it's the
non-Windows database of choice for people who have no clue how to
write a robust database app and would thus otherwise leak
connections to the server. Not to say that all MySQL users are that
way, of course -- I'm using it on some of my stuff! -- just that
many such users end up using MySQL and its defaults are aimed at
protecting them from themselves.
Geert, I can check in my code if you want, but I thought what I was
doing wasn't your preferred way of solving the problem. I'm just
doing a dummy SQL query ("select 1") once a minute, not doing
anything with clearing the pools. Your way sounds better but I
haven't had a chance to do it.
-Steve
Joshua Hansen wrote:
Hi Geert (et al),
Does anyone know offhand how other DBs & drivers handle this
situation?
Keeping stale connections to a minimum is desirable, so a timeout
mechanism such as MySQL provides seems like an intuitive way to
address this.
Why don't other DBs & drivers (i.e., Postgres) have this problem
-- how do they solve this?
Josh
--
Joshua Hansen
Up Bear Enterprises
(541) 760-7685
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users