Overview
enable_tcp_keepalive is used to enable or disable the keep-alive mechanism for client connections.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Only the
systenant can modify this parameter. User tenants cannot modify it.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Bool |
| Default Value | True |
| Value range |
|
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
The client connection keep-alive mechanism can be used to check the running status of clients. When a client exits abnormally, the system can release resources on the server side. Furthermore, some network devices, such as load balancers or gateways, maintain connections and check their status. If a connection remains in the Idle state for an extended period, these devices may disconnect or release it, causing abnormal disconnections between application clients and servers. The client connection keep-alive mechanism helps prevent such abnormal disconnections caused by network devices.
Configuration example
Sets the keep-alive mechanism for client connections.
obclient> ALTER SYSTEM SET enable_tcp_keepalive = True;