Document TypeㅣTechnical Information
CategoryㅣApp Development
Document NumberㅣTDETI006
Overview
In a TAC environment, when an AP developed with CLI experiences a failure on the Public Network of one of the two DB nodes or the server suddenly goes down, causing the AP to fail over to the other node, if the AP program does not receive a response about the connection termination from the server, the AP may fail to recognize the DB failure and wait indefinitely.
Therefore, this guide explains how to register AP server environment variables to prevent the AP from waiting indefinitely.
Method
AP Server TIMEOUT Environment Setting Registration Items
##### AP TIMEOUT ##### export TB_SO_KEEPALIVE=1 export TB_TCP_KEEPIDLE=30 export TB_TCP_KEEPCNT=5 export TB_TCP_KEEPINTVL=10
TB_SO_KEEPALIVE
This setting determines whether to use TIMEOUT with the following three environment variables.
Value 0: Not used / 1: Used
TB_TCP_KEEPIDLE
The initial wait time after the AP sends data to the server.
TB_TCP_KEEPCNT
The number of times to wait after the TB_TCP_KEEPIDLE time has passed since the AP sent data to the server.
TB_TCP_KEEPINTVL
The additional wait time after the TB_TCP_KEEPIDLE time has passed since the AP sent data to the server. In other words, after the AP sends data to the server and TB_TCP_KEEPIDLE time has passed, it waits for TB_TCP_KEEPCNT x TB_TCP_KEEPINTVL.
With the above settings: TB_TCP_KEEPIDLE=30, TB_TCP_KEEPCNT=5, TB_TCP_KEEPINTVL=10, the AP program waits a total of 30 + (5 x 10) = 80 seconds before disconnecting from the server and connecting to another node via Fail Over.