Subject | How to best handle network loss / changes |
---|---|
Author | Robert Martin |
Post date | 2013-12-03T20:02:30Z |
Hi
If I open a DB connection while logged into a VPN and then close my VPN
connection my DB connection breaks. This also happens some times when
plugging in / unplugging a network cable or loosing a Wifi connection
or logging into a new Wifi connection. One user even reports problems
while hibernating a laptop. It is easiest for me to replicate this by
using a VPN however :)
I am not blaming IBO or FB for that matter, but I would like to know how
best to deal with this situation?
Currently when I turn off the VPN the IBODatabase stays showing as
connected and there is no error until it tries to read further data
through the connection. At this point it gives a 'ISC 335544726 error
reading data from the connection' error if I try and get further data
from an open query or 'ISC 335544721 Unable to complete network request
to host "TAU"' if I try and open a new query. TAU is my machine name,
the app and DB are running on my PC and the connection is via TCP/IP
with the IBODatabase.Server property set to TAU.
If I try and close the connection with 'disconnect' I also get 'ISC
335544721 Unable to complete network request to host "TAU"' and the
connection is left open. A second attempt to close will work and I can
then reopen the connection and proceed ok. I am guessing that the DB
component looks up the IP address for the computer name and that when
this changes it doesn't re look it up! I have code that detects an IP
change an reconnects other (non DB) TCP connections in my app, it would
be great if I could do similar with IBO and FB.
Any suggestions ???
Thanks
Rob
If I open a DB connection while logged into a VPN and then close my VPN
connection my DB connection breaks. This also happens some times when
plugging in / unplugging a network cable or loosing a Wifi connection
or logging into a new Wifi connection. One user even reports problems
while hibernating a laptop. It is easiest for me to replicate this by
using a VPN however :)
I am not blaming IBO or FB for that matter, but I would like to know how
best to deal with this situation?
Currently when I turn off the VPN the IBODatabase stays showing as
connected and there is no error until it tries to read further data
through the connection. At this point it gives a 'ISC 335544726 error
reading data from the connection' error if I try and get further data
from an open query or 'ISC 335544721 Unable to complete network request
to host "TAU"' if I try and open a new query. TAU is my machine name,
the app and DB are running on my PC and the connection is via TCP/IP
with the IBODatabase.Server property set to TAU.
If I try and close the connection with 'disconnect' I also get 'ISC
335544721 Unable to complete network request to host "TAU"' and the
connection is left open. A second attempt to close will work and I can
then reopen the connection and proceed ok. I am guessing that the DB
component looks up the IP address for the computer name and that when
this changes it doesn't re look it up! I have code that detects an IP
change an reconnects other (non DB) TCP connections in my app, it would
be great if I could do similar with IBO and FB.
Any suggestions ???
Thanks
Rob