doc-exports/docs/dws/umn/dws_03_0025.html
Lu, Huayi 7505fe85a9 DWS UMN 8.1.3.200 VERSION
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-08-31 14:40:33 +00:00

23 lines
4.6 KiB
HTML

<a name="EN-US_TOPIC_0000001381889069"></a><a name="EN-US_TOPIC_0000001381889069"></a>
<h1 class="topictitle1">Why Was I Not Notified of Failure Unbinding the EIP When GaussDB(DWS) Is Connected Over the Internet?</h1>
<div id="body0000001381889069"><p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p1737160410248">After the EIP is unbound, the network may be disconnected. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a result, the gsql, ODBC, and JDBC clients also cannot identify the network fault in time.</p>
<p id="EN-US_TOPIC_0000001381889069__p136656134">The duration when the database sends the disconnection message to the client depends on the keepalive settings. The specific algorithm for calculating the duration is:</p>
<p id="EN-US_TOPIC_0000001381889069__p1795214451541"><strong id="EN-US_TOPIC_0000001381889069__b84235270617054">keepalive_time</strong> + <strong id="EN-US_TOPIC_0000001381889069__b84235270617057">keepalive_probes</strong> x <strong id="EN-US_TOPIC_0000001381889069__b8423527061713">keepalive_intvl</strong></p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p25096336102029">Keepalive values affect network communication stability. Adjust them to service pressure and network conditions.</p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p24540436102029">On Linux, run the <strong id="EN-US_TOPIC_0000001381889069__b84235270617310">sysctl</strong> command to modify the following parameters:</p>
<ul id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_ul2598334111540"><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li6369214011540">net.ipv4.tcp_keepalive_time</li><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li6434749111540">net.ipv4.tcp_keeaplive_probes</li><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li1828163911540">net.ipv4.tcp_keepalive_intvl</li></ul>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p25999200164024">For example, if you want to change the value of <strong id="EN-US_TOPIC_0000001381889069__b84235270617128">net.ipv4.tcp_keepalive_time</strong>, run the following command to change it to <strong id="EN-US_TOPIC_0000001381889069__b842352706171241">120</strong>.</p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p27802129162337"><i><b><span class="cmdname" style="font-family:Arial" id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_cmdname40920459164051">sysctl net.ipv4.tcp_keepalive_time=120</span></b></i></p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p15640178102029">On Windows, modify the following configuration information in registry <span class="filepath" id="EN-US_TOPIC_0000001381889069__filepath1612355534171251"><b>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters</b></span>:</p>
<ul id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_ul3846821711544"><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li2372125711544">KeepAliveTime</li><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li971649411544">KeepAliveInterval</li><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li3560920011544">TcpMaxDataRetransmissions (equivalent to <strong id="EN-US_TOPIC_0000001381889069__b84235270617412">tcp_keepalive_probes</strong>)</li></ul>
<div class="note" id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_note8795213143929"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p12048055143929">If you cannot find the preceding parameters in registry <span class="filepath" id="EN-US_TOPIC_0000001381889069__filepath1650537997164711"><b>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters</b></span>, add these parameters. Open<strong id="EN-US_TOPIC_0000001381889069__b842352706174526"> Registry Editor</strong>, right-click the blank area on the right, and choose <span class="menucascade" id="EN-US_TOPIC_0000001381889069__menucascade901868770174628"><b><span class="uicontrol" id="EN-US_TOPIC_0000001381889069__uicontrol1975363649174628">Create</span></b> &gt; <b><span class="uicontrol" id="EN-US_TOPIC_0000001381889069__uicontrol211807385174628">DWORD (32-bit) Value</span></b></span> to add these parameters.</p>
</div></div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_03_0024.html">Database Connections</a></div>
</div>
</div>