Mongodb---记一次事故故障
2014.06.19.001---故障报告 事故发生时间 事故简述 事故责任方 是否解决 19:21-20:15 IIS服务器D盘即将溢出 是 一、事故描述 : 在19:21收到警报,显示IIS/Router服务器的D盘空间即将负荷。 二、事故处理过程: 1. 登录服务器查看后,发现router的日志很
2014.06.19.001---故障报告
事故发生时间 |
事故简述 |
事故责任方 |
是否解决 |
19:21-20:15 |
IIS服务器D盘即将溢出 |
|
是 |
一、事故描述:
在19:21收到警报,显示IIS/Router服务器的D盘空间即将负荷。
二、事故处理过程:
1. 登录服务器查看后,发现router的日志很大,有超过100G,导致无法打开, 决定,先重启router服务,删除日志。
2. 重启完毕router后,日志又出现了猛刷的情况,进入查看,显示
2014-06-19T20:08:25.170+0800[conn8956] end connection 10.4.1.101:7389(100 connections now open)
2014-06-19T20:08:25.170+0800[mongosMain] connection accepted from 10.4.1.101:7390#8957 (101 connections now open)
2014-06-19T20:08:25.170+0800[conn8957] authenticate db: minger { authenticate: 1, user: "client",nonce: "xxx", key: "xxx" }
2014-06-19T20:08:25.170+0800[conn8957] end connection 10.4.1.101:7390(100 connections now open)
2014-06-19T20:08:25.170+0800[mongosMain] connection accepted from 10.4.1.101:7391#8958 (101 connections now open)
2014-06-19T20:08:25.170+0800[conn8958] authenticate db: minger { authenticate: 1, user: "client",nonce: "xxx", key: "xxx" }
2014-06-19T20:08:25.170+0800[conn8958] end connection 10.4.1.101:7391(100 connections now open)
2014-06-19T20:08:25.170+0800[mongosMain] connection accepted from 10.4.1.101:7392#8959 (101 connections now open)
2014-06-19T20:08:25.170+0800[conn8959] authenticate db: minger { authenticate: 1, user: "client",nonce: "xxx", key: "xxx" }
2014-06-19T20:08:25.170+0800[conn8959] end connection 10.4.1.101:7392(100 connections now open)
2014-06-19T20:08:25.186+0800[mongosMain] connection accepted from 10.4.1.101:7393#8960 (101 connections now open)
2014-06-19T20:08:25.186+0800[conn8960] authenticate db: minger { authenticate: 1, user: "client",nonce: "xxx", key: "xxx" }
3. 这个问题在阿里也一度遇到过,是由于阿里云的物理机的设置导致tcp请求 上不去,而出现这种情况。
4. 将IIS的tcp pool关闭,mongodb的pool关闭。随机日志不再狂刷。
三、分析原因:
Mongodb 驱动程序采用的连接池的方式连接到数据库,目前从观察到的情况是应用一开启便根据变量的设置,建立全部连接,然后提供给程序使用,并且一旦其中某个连接到数据库的访问失败,则会清空整个连接池到这台数据库的连接,并重新建立连接。
而mongodb对中断连接的垃圾清理工作则是懒惰的被动清理方式,如果驱动程序端配 置的连接数过大,一旦发生重连,则会导致mongo端堆积大量的垃圾连接数据,导致主机资源耗尽。
windows服务器,timewaitdelay 最小值是30秒,而mongodb pool size 设为2000
也就是说,如果2000个连接里有一个因为网络关系断开了,就要重新建立新的2000个连接,之前的2000个因为timewaitdelay的原因,暂时还不能释放,如果在30秒内,因为网络原因,重复建立连,接导致将60000个端口都用尽了。就会报错
但是既然耗尽了,为什么日志中显示一直有100个连接保持着呢?
对此,老大给出了一条很重要的信息,C#中,关于连接池的代码中,设定最小值为100。对此我做出的猜想是,是否这100个链接用的是系统的1024个端口中的100个?导致timewaitdelay不会涉及到这100个链接呢?尚待考证。
四、改进措施
1. 调整
MaxUserPort = 65534
MaxHashTableSize = 65536
MaxFreeTcbs = 16000
TcpNumConnections = 16777214
2. 将minpoolsize设为200,进行观察。
2014年06月20号

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











<p>MSTeams is the trusted platform to communicate, chat or call with teammates and colleagues. Error code 80090016 on MSTeams and the message <strong>Your computer's Trusted Platform Module has failed</strong> may cause difficulty logging in. The app will not allow you to log in until the error code is resolved. If you encounter such messages while opening MS Teams or any other Microsoft application, then this article can guide you to resolve the issue. </p><h2&

What is 0x0000004e failure? Failure is a common problem in computer systems. When a computer encounters a fault, the system usually shuts down, crashes, or displays error messages because it cannot run properly. In Windows systems, there is a specific fault code 0x0000004e, which is a blue screen error code indicating that the system has encountered a serious error. The 0x0000004e blue screen error is caused by system kernel or driver issues. This error usually causes the computer system to

What should I do if my Black Shark phone cannot be turned on? Teach you how to save yourself! In our daily lives, mobile phones have become an indispensable part of us. For many people, the Black Shark mobile phone is a beloved gaming phone. But it is inevitable that you will encounter various problems, one of which is that the phone cannot be turned on. When you encounter such a situation, don't panic. Here are some solutions that I hope will help you. First of all, when the Black Shark phone cannot be turned on, first check whether the phone has enough power. It may be that the phone cannot be turned on due to exhausted battery.

Black Shark is a smartphone brand known for its powerful performance and excellent gaming experience. It is loved by gamers and technology enthusiasts. However, just like other smartphones, Black Shark phones will have various problems, among which charging failure is a common one. Charging failure will not only affect the normal use of the mobile phone, but may also cause more serious problems, so it is very important to solve the charging problem in time. This article will start with the common causes of Black Shark mobile phone charging failures and introduce methods to troubleshoot and solve charging problems. I hope it can help readers solve the problem of Black Shark mobile phones.

What to do about 0x00000001 blue screen? The blue screen problem is a headache that many computer users often encounter. When our computer encounters a blue screen, it will suddenly stop running and display a blue screen interface with an error code. Among them, 0x00000001 is a common blue screen error code. Blue screen issues can be caused by a variety of reasons, including software errors, hardware failures, driver issues, and more. Although this problem can be frustrating, there are things we can do to resolve it. Below I will introduce some solutions to blue screen

Users who shared printers found that their win10 computers could not connect to the shared printers after upgrading the September 2021 patch. So what should they do if they encounter the win10 shared printer 0x0000011b failure? This problem is encountered by many users. , the following will give you the specific content of the win10 shared printer 0x0000011b fault solution. The method is very simple, and customers can learn it at a glance. What to do if win10 shared printer 0x0000011b fails 1. Open the control panel, enter the program and functions, and check the installed upgrade; 2. Uninstall the following patches: KB5005569/KB5005573/KB5005568/KB
![Mouse jumps when plugged into charger [Fixed]](https://img.php.cn/upload/article/000/887/227/170835319235361.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
If you notice that your mouse cursor is jumping when you plug it into the charger, this article may help you. There have been reports that the mouse cursor may behave erratically, jumping, selecting, and accidentally clicking when connecting the charger to the laptop. Power issues are usually one of the most common reasons for this. Why is my mouse having trouble charging? Laptop mouse failure may be caused by multiple reasons, such as battery, charger, charger brick, etc. failures. In addition, wiring problems with wall sockets are also common causes. Mouse jumps when plugged into charger If your mouse jumps when plugged into charger, use the following suggestions. Perform a hard reset, try another charger, run a battery test, update or reinstall the required drivers for the charger

Many friends have just bought a new graphics card. Just a few days after installing it, the fan suddenly stopped spinning. What is the reason? Is this normal? This must be a problem. You can check the graphics card in the chassis. , the memory and hard disk cables are connected and there is no power supply. Is it normal? Is there any voltage instability? Let’s take a look at the specific reasons with the editor. Answers to the reasons why the graphics card fan does not rotate: 1. Insufficient power supply causes the fan to not rotate. One of the most common reasons is that when the energy provided by your power supply cannot meet the requirements of the graphics card, in order to maintain the normal operation of the computer program, most graphics cards will stop their cooling fans to ensure that the GPU core can Continue to perform calculations. When encountering this situation, don’t blame the graphics card for not being powerful! It's obviously very considerate, okay?
