Note
For V2.2.77, this parameter is available starting with V2.2.77.
Description
enable_tcp_keepalive specifies whether to enable the keepalive mechanism for client connections.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
Only the
systenant can modify this parameter. User tenants cannot modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Boolean. |
| Default value | True. |
| Value range |
|
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
The keepalive mechanism for client connections can be used to check the status of the client. When the client exits unexpectedly, the system can release the resources on the server side. In addition, some network devices, such as load balancers or gateways, maintain connections and check their status. If a connection remains in the Idle state for a long time, the device may disconnect or release the connection. This will cause an unexpected disconnection between the client and the server. The keepalive mechanism for client connections can prevent this issue.
Examples
Set the keepalive mechanism for client connections to enabled.
obclient> ALTER SYSTEM SET enable_tcp_keepalive = True;