List:General Discussion« Previous MessageNext Message »
From:elble Date:July 15 1999 3:26pm
Subject:Re: mysql_ping() problem
View as plain text  
> >  So  I  though that Mysql_ping() should not hang. If the server can't
> >  be touch, shouldn't the connection be considered as down ? Shouldn't
> >  Mysql_ping() attempt a reconnection ?

my solution to this was to set an alarm (with an appropriate timeout)
before calling mysql_ping, and disconnect/try reconnecting in the signal
handler.

this works from perl DBI as well, i'm currently using this method in a 
few of my scripts.

of course, this doesn't work in Win32 land...

ymmv.

Thread
mysql_ping() problemBAUMEISTER Alexandre13 Jul
  • mysql_ping() problemsinisa14 Jul
    • Re: mysql_ping() problemBAUMEISTER Alexandre15 Jul
      • Re: mysql_ping() problemPaul DuBois15 Jul
        • Re: mysql_ping() problemelble15 Jul
          • Re[2]: mysql_ping() problemBAUMEISTER Alexandre16 Jul
            • Re[2]: mysql_ping() problemMichael Widenius29 Jul
        • Re[2]: mysql_ping() problemBAUMEISTER Alexandre16 Jul
          • Re[2]: mysql_ping() problemPaul DuBois16 Jul
            • Re[3]: mysql_ping() problemBAUMEISTER Alexandre19 Jul