zoukankan      html  css  js  c++  java
  • 如何自动关闭空闲的sde连接?【转载】

    如何自动关闭空闲的sde连接?【转载】
    http://www.ggiiss.com/gis/d4/472.html


    在连接sde的应用中,如果连接的客户比较多的情况下,可能会出现sde连接占用cpu资源十分严重,以至于出现系统死机的情况。

    Sde提供了TCPKEEPALIVE参数,用来侦测客户端连接情况。当TCPKEEPALIVE为True时,那么在2小时(TimeOut默认设置 7200000ms,即2小时)内,如果客户端没有向sde发送请求,sde连接将自动关闭,如果TCPKEEPALIVE为false,那么当客户端没 有向sde发送请求超过timeout规定时间,sde连接仍然占用。因此,如果我们想让系统自动关闭空闲的sde连接,那么我们就要把 TCPKEEPALIVE设置为true。默认安装的时候TCPKEEPALIVE的值为false。

    TCPKEEPALIVE参数可以通过sde命令来更改,例如:
    Sdeconfig –o alter –v TCPKEEPALIVE=TRUE –u sde –p sde
    改完后重启sde服务。

    注意:sde直连应用的情况下TCPKEEPALIVE参数不起作用。

    TCPKEEPALIVE的TimeOut时间是可以更改的,我们可以更改操作系统设置TimeOut间隔时间(5分钟-2小时)。例如:
           On Microsoft Windows set KeepAliveTime to 300000.
    \HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters\KeepAliveTime
    If the key does not already exist you will need to create it.
    The time specified is in milliseconds.
           On Sun Solaris use the ndd command with the -set option to configure the tcp_keepalive_interval.

    # ndd -set /dev/tcp tcp_keepalive_interval 300000

    The time specified is in milliseconds.

           On IBM AIX use the no command to set communication parameters.
    no -o tcp_keepidle=591



    The time specified is in halfseconds.






           On HP HP-UX use



    ndd -set /dev/tcp tcp_time_wait_interval 300000



    The time specified is in milliseconds.



           On RedHat Linux modify the following kernel parameter by editing the /etc/sysctl.conf file, and restart the network daemon (/etc/rc.d/init.d/network restart).



                 # Decrease the time default value for tcp_keepalive_time



    tcp_keepalive_time = 1800

  • 相关阅读:
    机器学习:逻辑回归(基础理解)
    机器学习:模型泛化(L1、L2 和弹性网络)
    机器学习:模型泛化(LASSO 回归)
    机器学习:模型泛化(岭回归:Ridge Regression)
    Numpy:np.random 的使用
    ASP.NET MVC 视图层-生成链接相关(Html.ActionLink,Url.Action)
    eval实例
    <a>实现按钮的javascript+jquery编程实例
    SQL Server之XML PATH()
    分页数算法
  • 原文地址:https://www.cnblogs.com/lauer0246/p/1237686.html
Copyright © 2011-2022 走看看