当前位置:网站首页>Thirty two - nodejs simple proxy pool (is it finished?) The SuperAgent uses a timeout that is not a timeout
Thirty two - nodejs simple proxy pool (is it finished?) The SuperAgent uses a timeout that is not a timeout
2022-06-09 10:36:00 【BerryBC】
1. despair
When I thought Part 1 When it's over , After sneaking out for a McDonald's with my girlfriend during the closure of the city, I found , Still the same TCP Slow increase in number :
Previous link :
Thirty one - NodeJS Simple proxy pool ( close ) And MongoDB The number of links exploded
2. screening
Go straight up The server See what's connecting so many TCP Connect , Don't see, don't know , It's a shock at first sight :
[[email protected] ~]$ netstat -tnlpoa|grep 9999|wc -l
399
[[email protected] ~]$ netstat -tnlpoa|grep 27017|wc -l
137
I'll go … Why? 9999 port than 27017 port So much TCP The number of connections ?
Take a closer look :
tcp 0 0 172.17.0.7:33426 163.204.244.111:9999 ESTABLISHED 2480/node /home/Ber off (0.00/0/0)
tcp 0 1 172.17.0.7:48676 216.140.201.110:9999 SYN_SENT 2480/node /home/Ber on (1.49/4/0)
tcp 0 1 172.17.0.7:47066 58.253.156.17:9999 SYN_SENT 2480/node /home/Ber on (13.57/5/0)
tcp 0 78 172.17.0.7:44104 112.111.217.217:9999 ESTABLISHED 2480/node /home/Ber on (65.50/15/0)
tcp 0 0 172.17.0.7:33446 182.35.85.137:9999 ESTABLISHED 2480/node /home/Ber off (0.00/0/0)
ok , I admit I don't know what it means , So the search engine :
linux Next netstat --timers / -o Explain and keepalive relevant
I collapsed. , There are some Connect For a whole 5、6 Even minutes .
But my code clearly states Timeout It's about ten seconds !
3. Code
let funGoRandSpy = (strRandProxy, funCB) => {
// On the Internet, I see that many high-profile agents are 9999 Port of , Just try a random test of everything on the Internet 9999 Ports
// Check the port instructions sudo netstat -tnlpoa|grep 9999|wc -l
let strProxy = 'http://' + strRandProxy + ':9999';
// console.log(' testing :' + strProxy);
// among intTimeout by 3000 ms
request.get('https://www.baidu.com').timeout({
response: that.intTimeout, deadline: that.intTimeout * 3 }).use(superagentCheerio).proxy(strProxy).set(that.objHeader).then((res) => {
let objProxyForSave = {
u: strRandProxy, p: '9999' };
objCTLSave.saveOneProxy(objProxyForSave, () => {
});
console.log(' ' + strProxy + ' The test passed unexpectedly !');
funCB(null, true);
}).catch((err) => {
funCB(null, true);
});
};
Why have you given feedback Overtime , You've been waiting !? My heart is waiting , Always waiting for ?
I searched the Internet for a long time , I also found SuperAgent Official website , I didn't say why , Then why !?
4. Temporary settlement
Temporary Solution yes , Since it Connect The biggest is 10 Minutes of , I decided to put this Perpetual cycle Put it in 10 Minutes later , That should be OK ?
See the results tomorrow after you wake up .
I think it can be solved .
5. Does anyone know why !!
Is there any A great god Please tell me how to break it ?
I feel , Need from The server From above ( My is Centos 7). SuperAgent Official website There is no similar answer in , I'm desperate .
Okay , Go to work tomorrow , Good night, .
边栏推荐
- [fruit recognition] fruit recognition based on morphology, including Matlab source code
- 科研入门,在导师完全散养不管的状态下,怎么提升自己的科研能力?
- 叁拾肆- sklearn 根据样本对文本情绪进行分类
- 山东济南的名人颜廷利东方著名哲学家及其思想,中国需要这样的思想家
- 1324. print word vertically - Li Kou Shuangbai code
- Lua call principle demonstration (Lua stack)
- Logout successful processor
- 2220. minimum number of bit flips to convert numbers
- 中信建投是安全的吗
- 【光学】 基于matlab模拟光的双缝干涉附GUI
猜你喜欢

【PHP】代码复用特殊类Trait的简要说明和相关举例

【光学】 基于matlab模拟光的双缝干涉附GUI

不加班的测试开发工程师不是好程序员?可能不是一只笨鸟,但一直在先飞......

Today in history: PHP is publicly released; IPhone 4 comes out; The birth of the father of the World Wide Web

失业潮?元宇宙开拓全新的就业机会

Kubernetes Chapter 7: Advanced pod, advanced controller, resource and dashboard

肆拾贰- JS 告诉你,到底你是贫穷还是富贵

叁拾柒- JS 在 Canvas 上尝试分形图形 (一) 画了一个普通箱子图
![[genius_platform software platform development] lesson 35: UDP for cross network segment broadcasting](/img/53/c8d8b388788e13bdbf5cad9fbf91d6.png)
[genius_platform software platform development] lesson 35: UDP for cross network segment broadcasting

【模型部署与业务落地】AI 框架部署方案之模型转换
随机推荐
肆拾贰- JS 告诉你,到底你是贫穷还是富贵
Interview question 01.06 String compression
多线程之生产者和消费者模型
Getting started with cloud based LDAP (Part 1)
Digital image processing graphic image restoration task
Webassembly 2022 survey coming
Jincang of the National People's Congress won the recognition of "key software enterprises encouraged by the state" again
中信建投是安全的吗
自定义失败处理
Is CSC safe
【模型部署与业务落地】AI 框架部署方案之模型转换
error NU1202: Package Volo.Abp.Cli 5.2.1 is not compatible with netcoreapp3.1
开发一个软件应用程序需要多少钱?
dotnet core 也能协调分布式事务啦!
How to pass the MySQL database header song training task stored procedure?
Sword finger offer 18 Delete the node of the linked list
山东济南的名人颜廷利东方著名哲学家及其思想,中国需要这样的思想家
Authentication successful processor
三拾壹- NodeJS簡單代理池(合) 之 MongoDB 鏈接數爆炸了
Unsupportedoperationexception exception resolution