Hey,

I ran accross an interesting issue.  It seems as though Radiator never
checks for the timeout of the connection to the database before trying to
execute a delete query.  So, what I did, is simply implemented the
ping() check in the reconnect routine.  Following is the patch to
SqlDb.pm.

--- /usr/src/Radiator-2.16.1/Radius/SqlDb.pm    Mon Jun 12 18:47:33 2000
+++ SqlDb.pm    Wed Jun 21 23:46:31 2000
@@ -98,7 +98,7 @@
     # Implement backoff strategy in case of database failure
     return 0 if time < $self->{backoff_until};
 
-    if (!defined $self->{dbh})
+    if (!defined $self->{dbh} || !$self->{dbh}->ping())
     {
        # A new connection is required, try all the 
-        # ones in the $self->{DBSource} in order til we 
+        # ones in the $self->{DBSource} in order till we 


That did it for me.  However, it does rely on a ping() DBI call which has
to be implemented by the underlying DBD driver, and not all of them
do.  MySQL seems to have that, not sure about the others.

-Garry


===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to