{"id":29694,"date":"2025-04-20T11:51:12","date_gmt":"2025-04-20T03:51:12","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/29694.html"},"modified":"2025-04-20T11:51:12","modified_gmt":"2025-04-20T03:51:12","slug":"%e6%b7%b1%e5%85%a5%e8%a7%a3%e6%9e%90tcp%e5%85%b3%e9%97%ad%e9%99%b7%e9%98%b1%ef%bc%9a%e4%b8%ba%e4%bb%80%e4%b9%88close_wait%e5%92%8ctime_wait%e6%80%bb%e8%ae%a9%e4%bd%a0%e7%9a%84%e6%9c%8d%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/29694.html","title":{"rendered":"\u6df1\u5165\u89e3\u6790TCP\u5173\u95ed\u9677\u9631\uff1a\u4e3a\u4ec0\u4e48CLOSE_WAIT\u548cTIME_WAIT\u603b\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u5d29\u6e83\uff1f"},"content":{"rendered":"<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>\n<ul>\n<li>\n<ul>\n<li>\u4e00\u3001TCP\u5173\u95ed\u6d41\u7a0b\u4e2d\u7684\u4e24\u5927&#034;\u5e7d\u7075&#034;\u72b6\u6001<\/li>\n<li>\u4e8c\u3001CLOSE_WAIT&#xff1a;\u88ab\u9057\u5fd8\u7684\u8fde\u63a5\u5893\u5730<\/li>\n<li>\u4e09\u3001TIME_WAIT&#xff1a;\u5b88\u62a4\u8005\u7684\u6700\u540e\u4f7f\u547d<\/li>\n<li>\u56db\u3001\u5b9e\u6218\u8bca\u65ad&#xff1a;\u4ece\u62a5\u8b66\u5230\u6839\u6cbb<\/li>\n<li>\u56db\u3001\u67b6\u6784\u7ea7\u9632\u5fa1\u7b56\u7565<\/li>\n<li>\u7ed3\u8bed&#xff1a;TCP\u72b6\u6001\u4e0d\u662f\u654c\u4eba&#xff0c;\u800c\u662f\u4fe1\u4f7f<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h5>\u4e00\u3001TCP\u5173\u95ed\u6d41\u7a0b\u4e2d\u7684\u4e24\u5927&#034;\u5e7d\u7075&#034;\u72b6\u6001<\/h5>\n<p>CLOSE_WAIT\u548cTIME_WAIT\u662fTCP\u56db\u6b21\u6325\u624b\u8fc7\u7a0b\u4e2d\u7684\u5173\u952e\u72b6\u6001&#xff1a;<\/p>\n<ul>\n<li>CLOSE_WAIT&#xff1a;\u88ab\u52a8\u5173\u95ed\u65b9\u7684&#034;\u672a\u5b8c\u6210\u53e5\u53f7&#034;<\/li>\n<li>TIME_WAIT&#xff1a;\u4e3b\u52a8\u5173\u95ed\u65b9\u7684&#034;\u6700\u540e\u5b88\u671b&#034;<\/li>\n<\/ul>\n<hr \/>\n<h5>\u4e8c\u3001CLOSE_WAIT&#xff1a;\u88ab\u9057\u5fd8\u7684\u8fde\u63a5\u5893\u5730<\/h5>\n<p>\u73b0\u8c61\u7279\u5f81<\/p>\n<ul>\n<li>netstat\u663e\u793a\u5927\u91cfCLOSE_WAIT\u8fde\u63a5<\/li>\n<li>\u670d\u52a1\u5668\u53e5\u67c4\u6570\u98d9\u5347&#xff0c;\u89e6\u53d1Too many open files\u9519\u8bef<\/li>\n<\/ul>\n<p>\u81f4\u547d\u6210\u56e0<\/p>\n<li>\n<p>\u4ee3\u7801\u9ed1\u6d1e<\/p>\n<ul>\n<li>\u672a\u6b63\u786e\u8c03\u7528close()\u51fd\u6570<\/li>\n<li>\u540c\u6b65\u963b\u585e\u8c03\u7528\u5bfc\u81f4\u8d44\u6e90\u672a\u91ca\u653e<\/li>\n<\/ul>\n<p> <span class=\"token keyword\">try<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token class-name\">Socket<\/span> socket <span class=\"token operator\">&#061;<\/span> serverSocket<span class=\"token punctuation\">.<\/span><span class=\"token function\">accept<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u4e1a\u52a1\u5904\u7406&#8230;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">catch<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token class-name\">Exception<\/span> e<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u672a\u5728\u7ed3\u675f\u65f6\u8c03\u7528close()\u51fd\u6570\u5173\u95edsocket<\/span><br \/>\n<span class=\"token punctuation\">}<\/span>\n <\/li>\n<li>\n<p>\u5ba2\u6237\u7aef\u7a81\u88ad\u65ad\u8fde<\/p>\n<ul>\n<li>\u5ba2\u6237\u7aef\u8fdb\u7a0b\u5d29\u6e83\u6216\u7f51\u7edc\u95ea\u65ad<\/li>\n<li>\u79fb\u52a8\u7aef\u9891\u7e41\u5207\u6362\u7f51\u7edc<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u534f\u8bae\u8bbe\u8ba1\u7f3a\u9677<\/p>\n<ul>\n<li>HTTP\u957f\u8fde\u63a5\u672a\u8bbe\u7f6e\u8d85\u65f6<\/li>\n<li>\u6587\u4ef6\u4f20\u8f93\u672a\u5b9e\u73b0\u65ad\u70b9\u7eed\u4f20<\/li>\n<\/ul>\n<\/li>\n<p>\u6838\u5f39\u7ea7\u89e3\u51b3\u65b9\u6848<\/p>\n<li>\n<p>\u4ee3\u7801\u5ba1\u67e5\u4e09\u677f\u65a7<\/p>\n<ul>\n<li>\u4f7f\u7528lsof -p &lt;PID&gt;\u5b9a\u4f4d\u672a\u5173\u95ed\u53e5\u67c4<\/li>\n<li>\u9759\u6001\u4ee3\u7801\u626b\u63cf\u5de5\u5177\u68c0\u6d4b\u8d44\u6e90\u6cc4\u6f0f<\/li>\n<li>\u5f3a\u5236\u6dfb\u52a0finally\u5173\u95ed\u5757<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u7cfb\u7edf\u53c2\u6570\u8c03\u4f18<\/p>\n<p> <span class=\"token builtin class-name\">echo<\/span> <span class=\"token number\">1800<\/span> <span class=\"token operator\">&gt;<\/span> \/proc\/sys\/net\/ipv4\/tcp_keepalive_time<br \/>\n<span class=\"token function\">sysctl<\/span> <span class=\"token parameter variable\">-w<\/span> <span class=\"token assign-left variable\">net.ipv4.tcp_tw_reuse<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span>\n <\/li>\n<hr \/>\n<h5>\u4e09\u3001TIME_WAIT&#xff1a;\u5b88\u62a4\u8005\u7684\u6700\u540e\u4f7f\u547d<\/h5>\n<p>1.\u5b58\u5728\u610f\u4e49<\/p>\n<p>\u5728TIME_WAIT\u72b6\u6001\u4e0b&#xff0c;\u4e3b\u52a8\u65ad\u5f00\u8fde\u63a5\u7684\u4e00\u65b9\u4f1a\u7b49\u5f852\u4e2aMSL(Maximum Segment Lifetime)\u65f6\u95f4&#xff0c;\u4e3b\u8981\u539f\u56e0\u6709\u4e24\u4e2a&#xff1a;<\/p>\n<p>&#xff08;1&#xff09; \u786e\u4fdd\u6700\u540e\u4e00\u4e2aACK\u5230\u8fbe\u5bf9\u7aef\u3002\u5f53\u53d1\u9001\u7ed9\u5bf9\u7aef\u7684ACK\u62a5\u6587\u4e22\u5931\u65f6&#xff0c;\u5bf9\u7aef\u4f1a\u8d85\u65f6\u91cd\u53d1\u4e00\u4e2aFIN\u62a5\u6587&#xff0c;\u672c\u7aef\u6b64\u65f6\u8fd8\u7ef4\u62a4\u7740\u8fde\u63a5\u7684\u76f8\u5173\u6570\u636e\u7ed3\u6784&#xff0c;\u53ef\u4ee5\u6536\u5230\u5bf9\u7aef\u53d1\u6765\u7684FIN\u62a5\u6587&#xff0c;\u7136\u540e\u91cd\u65b0\u53d1\u9001ACK\u62a5\u6587\u3002\u82e5\u8fd8\u662f\u51fa\u73b0\u4e22\u5305\u60c5\u51b5&#xff0c;\u53c8\u4f1a\u91cd\u590d\u4ee5\u4e0a\u6b65\u9aa4\u3002&#xff08;\u6700\u91cd\u8981&#xff09;<\/p>\n<p>&#xff08;2&#xff09;\u786e\u4fdd\u9057\u7559\u5728\u7f51\u7edc\u4e2d\u7684\u6570\u636e\u5305\u6d88\u6563\u3002\u7b49\u5f852\u4e2aMSL&#xff0c;\u53ef\u4ee5\u8ba9\u5411\u4e24\u4e2a\u65b9\u5411\u4f20\u8f93\u7684\u6570\u636e\u5305\u7ee7\u7eed\u53d1\u9001\u5b8c\u6bd5&#xff0c;\u907f\u514d\u901a\u4fe1\u53cc\u65b9\u5173\u673a\u540e\u7acb\u5373\u91cd\u542f&#xff0c;\u7531\u4e8e\u6570\u636e\u5305\u7684TTL\u6ca1\u6709\u4f7f\u7528\u5b8c&#xff0c;\u4f1a\u6536\u5230\u6765\u81ea\u4e0a\u4e00\u8f6e\u901a\u4fe1\u53d1\u9001\u7684\u6570\u636e\u5305\u3002<\/p>\n<p>\u707e\u96be\u573a\u666f<\/p>\n<p>\u5f53QPS\u8d85\u8fc765535\/(2*MSL)\u65f6&#xff0c;\u7aef\u53e3\u8d44\u6e90\u8017\u5c3d\u5bfc\u81f4\u65b0\u8fde\u63a5\u88ab\u62d2\u7edd<\/p>\n<p>\u9ad8\u6027\u80fd\u670d\u52a1\u8c03\u4f18<\/p>\n<li>sysctl -w net.ipv4.tcp_tw_recycle&#061;1<\/li>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u542f\u7528TCP\u8fde\u63a5\u7684\u5feb\u901f\u56de\u6536\u673a\u5236&#xff08;TIME_WAIT\u72b6\u6001\u8fde\u63a5\u7684\u5feb\u901f\u91cd\u7528&#xff09;\u3002\u542f\u7528tcp_tw_recycle\u540e&#xff0c;\u7cfb\u7edf\u4f1a\u52a0\u901f\u56de\u6536TIME_WAIT\u72b6\u6001\u7684\u8fde\u63a5&#xff0c;\u51cf\u5c11\u8d44\u6e90\u5360\u7528\u3002<\/li>\n<li>\u4f7f\u7528\u573a\u666f&#xff1a;\u9ad8\u5e76\u53d1\u670d\u52a1\u5668&#xff08;\u5982Web\u670d\u52a1\u5668\u3001API\u7f51\u5173&#xff09;\u9700\u8981\u5feb\u901f\u91cd\u7528\u7aef\u53e3&#xff1b;\u77ed\u8fde\u63a5\u9891\u7e41\u7684\u573a\u666f&#xff08;\u5982HTTP\u8bf7\u6c42&#xff09;<\/li>\n<li>\u7f3a\u70b9&#xff1a;\u4e00\u65b9\u9762&#xff0c;\u5728NAT\u73af\u5883\u4e0b\u53ef\u80fd\u5bfc\u81f4\u8fde\u63a5\u5931\u8d25&#xff08;RFC 1323\u65f6\u95f4\u6233\u95ee\u9898&#xff09;\u3002\u53e6\u4e00\u65b9\u9762&#xff0c;\u5b58\u5728\u517c\u5bb9\u6027\u95ee\u9898&#xff0c;\u67d0\u4e9b\u7f51\u7edc\u8bbe\u5907\u53ef\u80fd\u4e0d\u652f\u6301\u5feb\u901f\u56de\u6536\u673a\u5236\u3002<\/li>\n<\/ul>\n<li>sysctl -w net.ipv4.ip_local_port_range&#061;&#034;1024 65000&#034;<\/li>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u8bbe\u7f6e\u672c\u5730TCP\/UDP\u8fde\u63a5\u7684\u53ef\u7528\u7aef\u53e3\u8303\u56f4\u3002\u5c06\u53ef\u7528\u7aef\u53e3\u8303\u56f4\u6269\u5c55\u52301024 ~ 65000&#xff0c;\u589e\u52a0\u53ef\u7528\u7aef\u53e3\u6570\u91cf<\/li>\n<li>\u4f7f\u7528\u573a\u666f&#xff1a;\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u9700\u8981\u652f\u6301\u5927\u91cf\u8fde\u63a5&#xff1b;\u77ed\u8fde\u63a5\u9891\u7e41\u7684\u573a\u666f&#xff08;\u5982\u722c\u866b\u3001\u4ee3\u7406\u670d\u52a1\u5668&#xff09;\u3002<\/li>\n<li>\u7f3a\u70b9: \u4e00\u65b9\u9762&#xff0c;\u5982\u679c\u8303\u56f4\u8fc7\u5927&#xff0c;\u53ef\u80fd\u4e0e\u5176\u4ed6\u670d\u52a1\u51b2\u7a81\u7aef\u53e3\u3002\u53e6\u4e00\u65b9\u9762&#xff0c;\u5982\u679c\u8303\u56f4\u8fc7\u5927\u4f1a\u589e\u52a0\u5185\u6838\u67e5\u627e\u53ef\u7528\u7aef\u53e3\u7684\u5f00\u9500\u3002<\/li>\n<\/ul>\n<p>3.ulimit -n 1000000<\/p>\n<ul>\n<li>\u8bbe\u7f6e\u5f53\u524d\u7528\u6237\u8fdb\u7a0b\u7684\u6700\u5927\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff08;File Descriptor, FD&#xff09;\u6570\u91cf\u3002\u6bcf\u4e2a\u6253\u5f00\u7684\u6587\u4ef6\u3001\u5957\u63a5\u5b57\u3001\u7ba1\u9053\u7b49\u90fd\u4f1a\u5360\u7528\u4e00\u4e2aFD&#xff0c;\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u5c06\u6587\u4ef6\u63cf\u8ff0\u7b26\u7684\u6570\u91cf\u8bbe\u7f6e\u7684\u5927\u4e00\u4e9b&#xff0c;\u4ee5\u66f4\u597d\u7684\u652f\u6301\u9ad8\u5e76\u53d1\u3002\u901a\u5e38\u8bbe\u7f6e\u4e3a1024\u621665535&#xff0c;FD\u4e0a\u9650\u53ef\u4ee5\u63d0\u9ad8\u5230100\u4e07\u3002<\/li>\n<li>\u4f7f\u7528\u573a\u666f&#xff1a;\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u9700\u8981\u652f\u6301\u5927\u91cf\u8fde\u63a5&#xff08;\u5982Web\u670d\u52a1\u5668\u3001\u6570\u636e\u5e93&#xff09;&#xff1b;\u6587\u4ef6\u5bc6\u96c6\u578b\u5e94\u7528&#xff08;\u5982\u65e5\u5fd7\u5904\u7406\u3001\u5927\u6570\u636e\u5206\u6790&#xff09;\u3002<\/li>\n<li>\u7f3a\u70b9&#xff1a;\u8fc7\u591a\u7684FD\u4f1a\u5360\u7528\u5927\u91cf\u5185\u5b58\u548c\u5185\u6838\u8d44\u6e90&#xff0c;\u9700\u786e\u4fdd\u5185\u6838\u53c2\u6570fs.file-max\u8db3\u591f\u5927\u3002<\/li>\n<\/ul>\n<hr \/>\n<h5>\u56db\u3001\u5b9e\u6218\u8bca\u65ad&#xff1a;\u4ece\u62a5\u8b66\u5230\u6839\u6cbb<\/h5>\n<p>\u95ee\u9898\u5b9a\u4f4d\u4e94\u6b65\u6cd5<\/p>\n<li>\n<p>\u67e5\u770b\u72b6\u6001\u5206\u5e03<\/p>\n<p> <span class=\"token function\">netstat<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">awk<\/span> <span class=\"token string\">&#039;\/^tcp\/ {&#043;&#043;S[$NF]} END {for(a in S) print a, S[a]}&#039;<\/span>\n <\/li>\n<li>\n<p>\u83b7\u53d6\u5168\u5c40socket\u7edf\u8ba1<\/p>\n<p> ss <span class=\"token parameter variable\">-s<\/span>\n <\/li>\n<li>\n<p>\u5b9a\u4f4d\u5177\u4f53\u8fdb\u7a0b<\/p>\n<p> <span class=\"token function\">lsof<\/span> -i:\u7aef\u53e3\u53f7\n <\/li>\n<li>\n<p>\u6293\u53d6\u5f02\u5e38FIN\u5305<\/p>\n<p> tcpdump <span class=\"token parameter variable\">-i<\/span> eth0 <span class=\"token string\">&#039;tcp[tcpflags] &amp; (tcp-fin) !&#061; 0&#039;<\/span>\n <\/li>\n<li>\n<p>\u5206\u6790\u7ebf\u7a0b\u963b\u585e\u70b9<\/p>\n<p> jstack <span class=\"token operator\">&lt;<\/span>PID<span class=\"token operator\">&gt;<\/span>  <span class=\"token comment\"># Java\u5e94\u7528<\/span>\n <\/li>\n<hr \/>\n<h5>\u56db\u3001\u67b6\u6784\u7ea7\u9632\u5fa1\u7b56\u7565<\/h5>\n<li>\n<p>\u5fae\u670d\u52a1\u6cbb\u7406<\/p>\n<ul>\n<li>\u7194\u65ad\u673a\u5236&#xff08;Hystrix\/Sentinel&#xff09;<\/li>\n<li>\u5f02\u6b65\u975e\u963b\u585e\u901a\u4fe1&#xff08;gRPC\/RSocket&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u4e91\u539f\u751f\u65b9\u6848<\/p>\n<p> sysctls:<br \/>\n  &#8211; net.core.somaxconn&#061;2048<br \/>\n  &#8211; net.ipv4.tcp_max_tw_buckets&#061;2000000\n <\/li>\n<li>\n<p>\u76d1\u63a7\u4f53\u7cfb\u6784\u5efa<\/p>\n<ul>\n<li>Prometheus\u76d1\u63a7TCP\u72b6\u6001\u53d8\u5316\u7387<\/li>\n<li>Grafana\u914d\u7f6e\u72b6\u6001\u9608\u503c\u544a\u8b66<\/li>\n<li>ELK\u6536\u96c6dmesg\u5185\u6838\u65e5\u5fd7<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h5>\u7ed3\u8bed&#xff1a;TCP\u72b6\u6001\u4e0d\u662f\u654c\u4eba&#xff0c;\u800c\u662f\u4fe1\u4f7f<\/h5>\n<p>\u771f\u6b63\u7684\u9ad8\u624b\u901a\u8fc7CLOSE_WAIT\/TIME_WAIT\u8bfb\u61c2\u7cfb\u7edf\u8fd0\u884c\u72b6\u6001\u3002\u6bcf\u4e2a\u5f02\u5e38\u72b6\u6001\u7684\u80cc\u540e&#xff0c;\u90fd\u85cf\u7740\u4f18\u5316\u7cfb\u7edf\u8bbe\u8ba1\u7684\u9ec4\u91d1\u673a\u4f1a&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb965\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf7\u6b21\u3002TCP\u534f\u8bae\u7684close_wait\uff0ctime_wait\u72b6\u6001\u5b58\u5728\u7684\u539f\u56e0_\u5173\u95ed tcp timewait recycle<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[205,43,78],"topic":[],"class_list":["post-29694","post","type-post","status-publish","format-standard","hentry","category-server","tag-tcp-ip","tag-43","tag-78"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6df1\u5165\u89e3\u6790TCP\u5173\u95ed\u9677\u9631\uff1a\u4e3a\u4ec0\u4e48CLOSE_WAIT\u548cTIME_WAIT\u603b\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u5d29\u6e83\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/29694.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6df1\u5165\u89e3\u6790TCP\u5173\u95ed\u9677\u9631\uff1a\u4e3a\u4ec0\u4e48CLOSE_WAIT\u548cTIME_WAIT\u603b\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u5d29\u6e83\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb965\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf7\u6b21\u3002TCP\u534f\u8bae\u7684close_wait\uff0ctime_wait\u72b6\u6001\u5b58\u5728\u7684\u539f\u56e0_\u5173\u95ed tcp timewait recycle\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/29694.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-20T03:51:12+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/29694.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/29694.html\",\"name\":\"\u6df1\u5165\u89e3\u6790TCP\u5173\u95ed\u9677\u9631\uff1a\u4e3a\u4ec0\u4e48CLOSE_WAIT\u548cTIME_WAIT\u603b\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u5d29\u6e83\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-20T03:51:12+00:00\",\"dateModified\":\"2025-04-20T03:51:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/29694.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/29694.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/29694.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6df1\u5165\u89e3\u6790TCP\u5173\u95ed\u9677\u9631\uff1a\u4e3a\u4ec0\u4e48CLOSE_WAIT\u548cTIME_WAIT\u603b\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u5d29\u6e83\uff1f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u6df1\u5165\u89e3\u6790TCP\u5173\u95ed\u9677\u9631\uff1a\u4e3a\u4ec0\u4e48CLOSE_WAIT\u548cTIME_WAIT\u603b\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u5d29\u6e83\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/29694.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6df1\u5165\u89e3\u6790TCP\u5173\u95ed\u9677\u9631\uff1a\u4e3a\u4ec0\u4e48CLOSE_WAIT\u548cTIME_WAIT\u603b\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u5d29\u6e83\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb965\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf7\u6b21\u3002TCP\u534f\u8bae\u7684close_wait\uff0ctime_wait\u72b6\u6001\u5b58\u5728\u7684\u539f\u56e0_\u5173\u95ed tcp timewait recycle","og_url":"https:\/\/www.wsisp.com\/helps\/29694.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-20T03:51:12+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/29694.html","url":"https:\/\/www.wsisp.com\/helps\/29694.html","name":"\u6df1\u5165\u89e3\u6790TCP\u5173\u95ed\u9677\u9631\uff1a\u4e3a\u4ec0\u4e48CLOSE_WAIT\u548cTIME_WAIT\u603b\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u5d29\u6e83\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-20T03:51:12+00:00","dateModified":"2025-04-20T03:51:12+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/29694.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/29694.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/29694.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6df1\u5165\u89e3\u6790TCP\u5173\u95ed\u9677\u9631\uff1a\u4e3a\u4ec0\u4e48CLOSE_WAIT\u548cTIME_WAIT\u603b\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u5d29\u6e83\uff1f"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/29694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=29694"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/29694\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=29694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=29694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=29694"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=29694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}