网站模板库
  • 首页
  • web前端工具
    • HTML/JS转换工具
    • JS/HTML格式化工具
    • 字母/英文大小写转换工具
    • robots.txt文件生成工具
    • Js压缩/格式化工具
    • Css在线压缩工具_代码格式化
  • 关于我们
    • 免责声明
    • 联系我们
    • 广告服务
    • 服务项目
    • 关于我们
    • 网站轮播
    • 公告
    • 成都优优科技专用
    • 按行业分类
  • web学院
    • 服务器教程
    • 学习资料
      • 基础书籍
      • 交互书籍
      • 入门教程
      • 特效分类
    • 案例分享
    • web资讯
  • 网页特效
    • 图片特效
    • 导航特效
    • 滑动按钮
    • 表单特效
    • 文字特效
    • 弹窗特效
    • 其他特效
  • 织梦模板
    • 科技/电子/数码/通信
    • 文化/艺术/广告/传媒
    • 装修/设计/家居/家具
    • 基建/施工/地产/物业
    • 餐饮/酒店/旅游/票务
    • 食品/果蔬/饮料/日用
    • 服饰/珠宝/礼品/玩具
    • 摄影/婚庆/家政/生活
    • 运动/健身/体育/器材
    • 学校/教育/培训/科研
    • 美容/保健/医院/医疗
    • 金融/财税/咨询/法律
    • 政府/组织/集团/协会
    • 汽车/物流/交通/搬运
    • 机械/设备/制造/仪器
    • 化工/环保/能源/材料
    • 农业/畜牧/养殖/宠物
    • 其他模版
    • IT/软件/信息/互联网
  • 手机模板
    • 手机APP模板
    • 微信小程序模板
    • wap
  • 网站模板
    • joomla模板
    • Drupal模板
    • z-blog模板
    • EyouCms模板
    • Bootstrap模板
    • 帝国cms模板
    • CmsEasy模板
    • MetInfo模板
    • 购物商城模板
      • Shopify主题
      • PrestaShop主题
    • 后台模板
    • 纯HTML模板
    • ecshop模板
    • phpwind模板
    • pbootcms模板
    • phpcms模板
    • wordpress模板
    • discuz模板
  • 教程
    • 织梦教程
    • Discuz教程
    • WordPress教程
    • Phpcms教程
    • Phpwind教程
    • ECShop教程
    • Joomla教程
    • Drupal教程
    • zblog教程
    • EyouCMS教程
    • 帝国cms教程
    • MetInfo教程
    • CmsEasy教程
登录
当前位置:网站模板库 > web学院 > 服务器教程 > Windows TCPIP 连接数限制
商业源码 服务器教程 2024-01-04 18:20:02

Windows TCPIP 连接数限制

Windows TCPIP 连接数限制,第1张

From:https://supportsolarwindscom/SuccessCenter/s/article/NETSTAT-A-command-displays-too-many-TCP-IP-connectionslanguage=en_US

NETSTAT -A command displays too many TCP/IP connections

Running the NETSTAT -A command from the command prompt shows a large number of TCP/IP connections established by the ipMonitor software If ipMonitor is unable to open new connections, monitor failures can occur

Overview

Running the NETSTAT -A command from the command prompt shows a large number of TCP/IP connections established by the ipMonitor software This increased network traffic can affect ipMonitor's ability to create new connections, especially since many existing TCP/IP connections remain in a reserved TIME_WAIT state Ultimately, if ipMonitor is unable to open new connections, monitor failures can occur

Environment

ipMonitor 108;ipMonitor 10x

Cause

The majority of TCP/IP connections displayed are ephemeral ports that have already been closed, but that remain reserved before they can be reused This reserved state is denoted by the netstat TIME_WAIT label

Microsoft limits the number of connections to 3975 by default, meaning that there can only be 3975 TCP/IP connections open at any given time In addition, the TIME_WAIT state is configured by default to be 240 seconds This means that Windows can only support an average of 33 TCP/IP connections per second ipMonitor must then wait 240 seconds before being able to reuse those connections If you have a large number of configured Monitors set to retest resources at short intervals, 3975 connections every four minutes may not be enough

Resolution

Warning: Windows registry changes can result in severe system damage if performed incorrectly Before you modify the registry, make a backup copy and ensure you understand how to restore the registry if a problem occurs 

Attempt the troubleshooting steps in the following order:

Increase the refresh time between monitor tests 

If possible, SolarWinds recommends configuring your monitors to use the default value of 300 seconds between monitor tests This optimal setting ensures there are enough TCP connections available when needed

Increase the maximum simultaneous connections 

Start the Registry Editor(Regedt32exe)

Access the following registry key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Add a DWORD value to this registry key:

Name: MaxUserPort

Type: DWORD

Value: 65534 (decimal)

Exit the Registry Editor

Note: This section can also be used as reference during large Server & Application Monitor (SAM) installations

Reduce the duration of the Reserved State 

Reducing the value of the TIME_WAIT state results in TCP connections being reused faster, therefore allowing for an increased number of connections during the same length of time Note that if the value is too low, the TCP connection may close before monitor testing is complete

Start the Registry Editor (Regedt32exe)

Access the following registry key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Add a DWORD value to this registry key:

Name: TcpTimedWaitDelay

Type: REG_DWORD - Time in seconds

Value: 120 (decimal)

Exit the Registry Editor

Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment  You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any

这是因为传输控制协议/Internet协议(TCP/IP)堆栈是Microsoft XP/ 2003的核心组件,不能删除。在这种情况下,如果需要重新安装TCP/IP以使TCP/IP堆栈恢复为原始状态。可以使用NetShell实用程序重 置TCP/IP堆栈,使其恢复到初次安装操作系统时的状态。方法是:在命令提示符后键入以下命令,然后按ENTER键:netsh int ip reset c:\resetlogtxt,其中,Resetlogtxt记录命令结果的日志文件,一定要指 定,这里指定了Resetlogtxt日志文件及完整路径。运行此命令的结果与删除并重新安装TCP/IP协议的效果相同。

如果是有线,下载设为300KB/s,上传设为30KB/s

如果是1M ADSL,下载设为125KB/s,上传设为15KB/s

如果是2M ADSL,下载设为250KB/s,上传设为25KB/s

如果上传速度过大会影响下载速度的

首先要明白TCP四元组的样子,四元组分别是<源IP,目的IP,源端口,目的端口>。

(前面2个元素在IP头部,后面2个元素在TCP头部)

IPv4的地址是4个字节,所以是32位。

端口是2个字节,所以是16位。

因此当服务器的IP地址和监听端口都确定的时候,并发连接数的天花板是2^(32 + 16)。

TCP协议想要实现百万级别的高并发,必须使用基于事件驱动的全异步开发模式。

单机如何实现管理百万主机的心跳服务?

https://wwwjianshucom/p/8d93d22416cb

https://timegeekbangorg/column/article/240656

1、可使用以下命令,查看当前服务器启动的httpd进程数,亦即当前服务器提供httpd服务的并发请求数。

2、获取服务器实时的httpd服务并发请求数,可以与配置文件/etc/httpd/conf/httpdconf中的MaxRequestWorkers 数量进行对比,看是否需要对最大服务并发数进行更改。

3、运行以下命令,则可以对当前服务器为提供web服务,而开放80端口,与外部请求建立连接的连接数进行查看和统计。

4、当前服务器的httpd服务已建立连接数,即httpd服务的TCP连接状态为ESTABLISH的连接,所以可以用以下命令查看、统计。

5、通过查看当前httpd服务的TCP连接数,可对请求访问的IP进行分类汇总,查看是否存在同一IP地址恶意刷连接,过多占用系统资源情况存在,进而做出必要的处理。查看统计命令如下。

6、如果某个IP地址的连接请求过多,我们则可以通过修改配置文件/etc/httpd/conf/httpdconf,加入以下语句来阻止它的访问。

listen的backlog参数指定的是已经三次握手完成,达到了established状态但是等待accept的队列的容量。当这个容量超过上限的时候服务器端便不处理客户端的三次握手了。这个队列的容量当然不是楼主所说的并发连接数。

但是lisen的再后一道程序便是accept了。如果你想要的是在tcp并发连接数量超过上限的时候服务器不再处理了三次握手那么只有两种办法:

1关闭listen的socket

2自己修改tcp协议栈的实现,当然这个就比较麻烦了。

用iptables防火墙来限制tcp连接,

如下,限制用户的tcp连接数为50

iptables -I INPUT-p tcp -m connlimit --connlimit-above 50 -j REJECT

设为 命令 如果 服务器 连接数
DABAN RP主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
网站模板库 » Windows TCPIP 连接数限制

商业源码 钻石

分享到:
上一篇
剑网3电信服务器连接不上
下一篇
我的世界丰收物语怎么结婚

相关推荐

台服枫之谷(冒险岛)为什么玩不了?

台服枫之谷(冒险岛)为什么玩不了?

织梦网首页和网站后台登录界面空白,是什么原因呢?

织梦网首页和网站后台登录界面空白,是什么原因呢?

dell服务器i(图标)的指示灯一直闪烁,怎么回事

dell服务器i(图标)的指示灯一直闪烁,怎么回事

电脑吃鸡显示服务器繁忙

电脑吃鸡显示服务器繁忙

0条评论

发表评论 取消回复

要发表评论,您必须先登录。

提供最优质的资源集合

立即查看 了解详情
网站模板库

主题/付费下载/查看/余额管理/自定义积分,集成支付,卡密,推广奖励等。

本站导航
  • 链接标题
友情链接
  • 链接标题
快速搜索
本站由钛宇宙强力驱动
友情链接:
    商业源码网蜀ICP备2023005044号
    网站模板库
    • 登录
    • 注册
    网站模板库
    • 首页
    • web前端工具►
      • HTML/JS转换工具
      • JS/HTML格式化工具
      • 字母/英文大小写转换工具
      • robots.txt文件生成工具
      • Js压缩/格式化工具
      • Css在线压缩工具_代码格式化
    • 关于我们►
      • 免责声明
      • 联系我们
      • 广告服务
      • 服务项目
      • 关于我们
      • 网站轮播
      • 公告
      • 成都优优科技专用
      • 按行业分类
    • web学院►
      • 服务器教程
      • 学习资料►
        • 基础书籍
        • 交互书籍
        • 入门教程
        • 特效分类
      • 案例分享
      • web资讯
    • 网页特效►
      • 图片特效
      • 导航特效
      • 滑动按钮
      • 表单特效
      • 文字特效
      • 弹窗特效
      • 其他特效
    • 织梦模板►
      • 科技/电子/数码/通信
      • 文化/艺术/广告/传媒
      • 装修/设计/家居/家具
      • 基建/施工/地产/物业
      • 餐饮/酒店/旅游/票务
      • 食品/果蔬/饮料/日用
      • 服饰/珠宝/礼品/玩具
      • 摄影/婚庆/家政/生活
      • 运动/健身/体育/器材
      • 学校/教育/培训/科研
      • 美容/保健/医院/医疗
      • 金融/财税/咨询/法律
      • 政府/组织/集团/协会
      • 汽车/物流/交通/搬运
      • 机械/设备/制造/仪器
      • 化工/环保/能源/材料
      • 农业/畜牧/养殖/宠物
      • 其他模版
      • IT/软件/信息/互联网
    • 手机模板►
      • 手机APP模板
      • 微信小程序模板
      • wap
    • 网站模板►
      • joomla模板
      • Drupal模板
      • z-blog模板
      • EyouCms模板
      • Bootstrap模板
      • 帝国cms模板
      • CmsEasy模板
      • MetInfo模板
      • 购物商城模板►
        • Shopify主题
        • PrestaShop主题
      • 后台模板
      • 纯HTML模板
      • ecshop模板
      • phpwind模板
      • pbootcms模板
      • phpcms模板
      • wordpress模板
      • discuz模板
    • 教程►
      • 织梦教程
      • Discuz教程
      • WordPress教程
      • Phpcms教程
      • Phpwind教程
      • ECShop教程
      • Joomla教程
      • Drupal教程
      • zblog教程
      • EyouCMS教程
      • 帝国cms教程
      • MetInfo教程
      • CmsEasy教程

      弹窗标题

      这是一条网站公告,可在后台开启或关闭,可自定义背景颜色,标题,内容,用户首次打开关闭后不再重复弹出,此处可使用html标签...