• 修改socket为keepAlive


     参考文章:http://blog.csdn.net/ctthuangcheng/article/details/8596818

    [root@mdw-2 gpadmin]# vi /etc/sysctl.conf

    追加添加如下:

    net.ipv4.tcp_keepalive_time=90
    net.ipv4.tcp_keepalive_intvl=15
    net.ipv4.tcp_keepalive_probes=2

    使生效:

    [root@mdw-2 gpadmin]# sysctl -p
    kernel.shmmax = 500000000
    kernel.shmmni = 4096
    kernel.shmall = 4000000000
    kernel.sem = 250 512000 100 2048
    kernel.sysrq = 1
    kernel.core_uses_pid = 1
    kernel.msgmnb = 65536
    kernel.msgmax = 65536
    kernel.msgmni = 2048
    net.ipv4.tcp_syncookies = 1
    net.ipv4.ip_forward = 0
    net.ipv4.conf.default.accept_source_route = 0
    net.ipv4.tcp_tw_recycle = 1
    net.ipv4.tcp_max_syn_backlog = 4096
    net.ipv4.conf.all.arp_filter = 1
    net.ipv4.ip_local_port_range = 1025 65535
    net.core.netdev_max_backlog = 10000
    net.core.rmem_max = 2097152
    net.core.wmem_max = 2097152
    vm.overcommit_memory = 2
    net.ipv4.tcp_keepalive_time = 15
    net.ipv4.tcp_keepalive_intvl = 1
    net.ipv4.tcp_keepalive_probes = 3

    查看:

    [root@mdw-2 gpadmin]# sysctl -a | grep keepalive
    net.ipv4.tcp_keepalive_time = 15
    net.ipv4.tcp_keepalive_probes = 3
    net.ipv4.tcp_keepalive_intvl = 1
  • 相关阅读:
    计算机网络——简单的端口扫描器
    Java课程设计——模拟行星运动
    H5 自定义数据属性
    实时获取网络状态
    Web 存储
    关于节流阀的理解
    DOM元素尺寸和位置
    H5选择符api
    HTML和XHTML的区别
    HTML的发展史
  • 原文地址:https://www.cnblogs.com/renlipeng/p/6215323.html
Copyright © 2020-2023  润新知