Skip to Content.
Sympa Menu

freetds - [freetds] Reconnection and asserts problem - tolerantness/less?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "V.Kukushkin" <kvd AT internet2.ru>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Reconnection and asserts problem - tolerantness/less?
  • Date: Fri, 5 Nov 2004 09:02:07 +0300

Authors, could you help me ?

I have encountered the following reconnection problem:
My task keeps persistent connection with SQL server (MSSQL 2000) and
periodically checks if connection is alive
(by calling getpeername()). If the connection is lost I use tds_connect() to
reconnect.

And, in situation when connection is lost during this call, I get
assert(in_wire == -1) and my task is broken.
Two questions:
1) What's wrong in sequence of calls? Should I free and then allocate socket
again ? I.e.:
tds_free_socket()
tds_alloc_socket()
tds_connect()
2) Do you think that this assert is acceptable even in debug mode ?

Could we (users of TDS) get more tolerant code? I mean tolerant to lost
connections during tds_connect() tds_submit_xx() and tds_process_xx() ? For
example, I got assert/abort when tried to process short simple query but
server was heavy LOADED with night cleanings. Just timeout 60 sec wasn't
enough. Do you suppose is it a reason for assert ?

At the end I am sorry for rather loud sounds, tired to fix these problems ;-)

PS: my Configuration:
i386
Linux 2.4.20
TDS 0.62.4

---
Best regards,
V.Kukushkin




Archive powered by MHonArc 2.6.24.

Top of Page