Load Ingest Data
Results 1 to 1 of 1

Thread: Handling ODBC data access errors due to timeouts

  1. #1
    Join Date
    Sep 2006
    Posts
    233
    Rep Power
    10

    Handling ODBC data access errors due to timeouts

    Question:

    I am using the Attunity ODBC provider to access a database on another machine. The application opens an ODBC connection and keeps it open throughout its lifetime.

    After several hours of inactivity, when the application tries to query the database via the ODBC connection it receives error messages like:

    (C042) Remote call to XXX failed; IRPC: Unable to receive
    while further retries seem to succeed. What's going on?

    Answer:

    The C042 (as well as other error indications with the return code -1601) are indicative of network disconnects. Network disconnect may occur for varied reasons including:

    1. The server has a non-zero idleClientTimeout setting in the workspace definition. In that case, following the specified inactivity time, the server simply closes the connection with the client and frees all resources allocated to it. The client will detect this only on the next time it tries to communicate with the server.
    2. Some network problem broke the socket connection. This may occur due to some physical error (someone pulled out the network plug in a Windows machine), load issue (the socket's queue overflowed), manual server recycle by an operator or even failure of the server process. If the server log also shows a connection related error then the reason is probably something in the network. If the server log shows other errors or exceptions, then the problem is probably related to something that occurred on the server.
    3. The network may also have timeouts that would affect the application. This include NAT mapping timeouts, VPN session timeouts, etc. In most cases, setting the socket level keepalive time to be shorter than the NAT or VPN connection timeout can avoid this kind of disconnect. Another option is to increase the NAT or VPN timeout so that it is longer than the application idle time.

    Disconnects may always happen due to externalities even if all the timeout settings are optimal. For this reason the application should be programmed to handle disconnects in a graceful manner.

    The way the Attunity ODBC provider deals with network disconnects is by returning an error on the first detection of a network disconnect with the next operation automatically trying to reconnect and execute the request.

    Applications that tend to idle for long periods between work may offer better reliability by issuing a dummy SQL request before starting the new body of work. Note that the SQL must be targeted at the remote server, for example, executing SELECT COL1 FROM REMOTE:TBL1 LIMIT TO 1 ROWS
    Last edited by DrorHarari; 01-28-2007 at 11:45 AM.
    By Dror Harari

    To Find Out more About Attunity Technology:
    Attunity
    or:
    Contact Us

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •