Hi Claudiu, I'm not sure whether I fully understand your problem. However, you should be aware that libdbi does not pull any magic tricks in terms of the database client/server networking. libdbi uses whichever function(s) the database client library provides. Therefore I suggest you ask a MySQL mailing list if there are some libmysqlclient settings which relate to your problem. Once you know what to do, you're welcome to get back to this list so we can see if libdbi can handle that.
regards, Markus Claudiu Cismaru <[EMAIL PROTECTED]> was heard to say: > > Hello, > > I created the following problem: > > Host A runs my software that uses libdbi. Host B it's the database > server (MySQL one, for now is in the same LAN with Host A). > > I have a thread that receive a linked list with the data that has to be > written to the database. At every 5 minutes, this thread is created and > runs until it finish the inserts, then terminates. > > On the Host B (the db one) I'm using iptables to simulate the network > down problem, like: > > iptables -A INPUT -s IP_OF_HOST_A -p tcp --dport 3306 -j REJECT > --reject-with icmp-host-unreachable > > This generates ICMP packets simulating that host has gone away, if > packets arrive on 3306. > > In the writing thread I have a simple: > > res = dbi_conn_query (...); > > When the program call the function it blocks for unlimited amount of > time (as much as I leave the REJECT rule on the DB host)... > > There is a way to make somehow a kind of timeout? A timer and killing > the thread it's not a clean solution... Or there is a parameter that > can be set? Or I have to hack in the libdbi source code? > > I'm using persistent connection (connection is made at the start of the > program). I don't know if: connect, do job, disconnect it's a good > solution also... > > -- > Claudiu Cismaru > GPG Key: http://maya.cnixs.com/~claudiu/claudiu.gpg > -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users