solidDB Help : Programming : Using HotStandby with applications : Defining timeouts between applications and servers
  
Defining timeouts between applications and servers
You can configure application read timeout and connect timeout settings by using either parameters in the client-side solid.ini file or the connect string of the SQLConnect function for ODBC.
These timeout values apply to the server connections made by client applications, including solidDB SQL Editor (solsql), solidDB Remote Control (solcon), and HA Manager.
Specifying application read timeout
The application read timeout option helps detect failures in low level network RPC read operations. The timeout setting applies to the read in the physical network (TCP/IP protocol only).
This RPC read timeout (called connection timeout in ODBC and JDBC) can be configured (in milliseconds) in the following ways. The default timeout is 0 – infinite (operating system default timeout applies),
Client-side Com.ClientReadTimeout parameter (see Communication section (client-side)).
For example:
[Com]
;Set RPC read timeout to 1000 milliseconds (one second)
ClientReadTimeout=1000
Client-side Com.Connect parameter with option -rmilliseconds
For example:
[Com]
;Set RPC read timeout to 1000 milliseconds (one second)
Connect=TCP -r1000 1313
Note For client applications such as the Watchdog, it is convenient to provide the RPC read timeout (called also connection timeout) in the Com.Connect parameter by using the ‑r option. Otherwise certain network failure types can cause indefinite waits.
Note The Connect parameters in the [Com] section, [Watchdog] section, and [Hotstandby] section are for different purposes. Make sure that you edit the correct one.
Connect string of the SQLConnect function (-r option)
For example:
SQLConnect (hdbc, "TCP -r1000 1313", SQL_NTS,
"dba", SQL_NTS, "dba", SQL_NTS);
In the example above, the constant SQL_NTS indicates that the previous string (servername, username, or password) was passed as a standard Null-Terminated String.
Specifying connect timeout
You can specify the connect timeout (called also login timeout) value in the Connect parameter of the [Com] and [Watchdog] sections of the solid.ini file. This connect timeout works only for the TCP/IP protocol.
The syntax is:
Parameter = tcp -cnumber-of-milliseconds [machine name] port_number
where Parameter is Connect or Listen.
For example:
[Com]
;The server listens to port 1320, and the Connection timeout is 1000 ms.
Listen = tcp -c1000 1320
If no value is provided for the connect timeout, the server uses the operating system-specific default value.
Note For client applications, such as the Watchdog, it is a good idea to provide a connect timeout value. Otherwise certain network failure types can cause a long wait before the failure is detected.
Go up to
Using HotStandby with applications