{"id":1387,"date":"2013-05-02T18:24:33","date_gmt":"2013-05-02T10:24:33","guid":{"rendered":"http:\/\/www.hiheng.com\/blog\/?p=1387"},"modified":"2013-05-09T13:02:21","modified_gmt":"2013-05-09T05:02:21","slug":"apache%e9%85%8d%e7%bd%ae%e4%b8%ad%e7%9a%84threadsperchildmaxrequestsperchildwin32disableacceptex","status":"publish","type":"post","link":"http:\/\/www.hiheng.com\/blog\/?p=1387","title":{"rendered":"apache\u914d\u7f6e\u4e2d\u7684ThreadsPerChild\\MaxRequestsPerChild\\Win32DisableAcceptEx"},"content":{"rendered":"<p>\u3010\u8bb0\u5f55\u3011\u516c\u53f8\u7684\u670d\u52a1\u5668\u8fd1\u671f\u4e0d\u600e\u4e48\u7a33\u5b9a\uff0c\u4e94\u4e00\u5047\u671f\u90fd\u6ca1\u6d88\u505c\u3002\u5728\u6392\u9664\u786c\u4ef6\u3001\u8f6f\u4ef6\u95ee\u9898\u540e\uff0c\u5f00\u59cb\u68c0\u67e5apache\u914d\u7f6e\u95ee\u9898\u3002<\/p>\n<p>win2003\u7cfb\u7edf\u4e0bapache\u73af\u5883\uff0cmpm_winnt.c\u6a21\u5f0f\uff0c\u4f18\u5316\u53c2\u6570\uff1a<\/p>\n<p><strong><a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/mod\/mpm_common.html#threadsperchild\" target=\"_blank\">ThreadsPerChild<\/a><\/strong> \u8bf4\u660e\uff1a\u6bcf\u4e2a\u5b50\u8fdb\u7a0b\u5efa\u7acb\u7684\u7ebf\u7a0b\u6570\uff0c\u9ed8\u8ba4\u503c:64\uff0c\u6700\u5927\u503c:1920\u3002\u7f51\u4e0a\u67e5\u8be2\u8d44\u6599\u5efa\u8bae\u8bbe\u7f6e\u5728100-500\u4e4b\u95f4\u3002\u5982\u670d\u52a1\u5668\u6027\u80fd\u9ad8\uff0c\u53ef\u8bbe\u7f6e\u66f4\u5927\u503c\u3002<\/p>\n<p><strong><a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/mod\/mpm_common.html#maxmemfree\" target=\"_blank\">MaxRequestsPerChild<\/a><\/strong> \u8bf4\u660e\uff1a\u6bcf\u4e2a\u5b50\u8fdb\u7a0b\u5728\u5176\u751f\u5b58\u671f\u5185\u5141\u8bb8\u4f3a\u670d\u7684\u6700\u5927\u8bf7\u6c42\u6570\u91cf\uff0c\u4e5f\u5c31\u662f\u6700\u5927\u7ebf\u7a0b\u3002\u5982\u679c\u8d85\u8fc7\u9650\u5236\uff0c\u5b50\u8fdb\u7a0b\u4f1a\u7ed3\u675f\u3002\u9ed8\u8ba4\u503c\uff1a0\u3002<br \/>\nMaxRequestsPerChild\u7684\u503c\u4e0d\u80fd\u8bbe\u7f6e\u4e3a0\uff0c\u4f1a\u56e0\u5b50\u8fdb\u7a0b\u4e0d\u7ed3\u675f\u800c\u8017\u5c3d\u5185\u5b58\u3002<br \/>\n\u7ebf\u7a0b\u8bbe\u7f6e\u4e5f\u4e0d\u662f\u8d8a\u5927\u8d8a\u597d\uff0c\u592a\u5927\u4f1a\u5bfc\u81f4\u4ea7\u751f\u65b0\u7684\u5b50\u8fdb\u7a0b\u540e\u957f\u671f\u7a7a\u95f2\uff0c\u5e76\u975e\u6700\u4f73\u4f18\u5316\u3002\u8981\u6839\u636e\u670d\u52a1\u5668\u7684\u786c\u4ef6\u914d\u7f6e\u3001\u7cfb\u7edf\u73af\u5883\u3001\u8bbf\u95ee\u6d41\u91cf\u7b49\u8c03\u8bd5\u8bbe\u7f6e\u3002<br \/>\n\u5982\u679c\u503c\u592a\u5c0f\uff0c\u4e5f\u4f1a\u9020\u6210apache\u9891\u7e41\u91cd\u542f\u6027\u80fd\u964d\u4f4e\uff0c\u5728\u65e5\u5fd7\u4e2d\u4f1a\u51fa\u73b0\u8fd9\u6837\u7684\u63d0\u793a\uff1a<\/p>\n<blockquote><p>Process exiting because it reached MaxRequestsPerChild. Signaling the parent<\/p><\/blockquote>\n<p><strong><a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/mod\/mpm_winnt.html\" target=\"_blank\">Win32DisableAcceptEx<\/a><\/strong><br \/>\n\u4f7f\u7528accept()\u4ee3\u66ffAcceptEx()\u63a5\u53d7\u7f51\u7edc\u94fe\u63a5\u3002AcceptEx()\u662f\u4e00\u4e2a\u5fae\u8f6f\u7684WinSock2 API \uff0c\u901a\u8fc7\u4f7f\u7528BSD\u98ce\u683c\u7684accept() API\u63d0\u4f9b\u4e86\u6027\u80fd\u6539\u5584\u3002\u4e00\u4e9b\u6d41\u884c\u7684Windows\u4ea7\u54c1\uff0c\u6bd4\u5982\u9632\u75c5\u6bd2\u8f6f\u4ef6\u6216\u865a\u62df\u4e13\u7528\u7f51\u7edc\u8f6f\u4ef6\uff0c\u4f1a\u5e72\u6270AcceptEx()\u7684\u6b63\u786e\u64cd\u4f5c\u3002<\/p>\n<p>\u4f18\u5316\u540e\u76ee\u524d\u8fd8\u6bd4\u8f83\u7a33\u5b9a\uff0c\u505a\u4e2a\u8bb0\u5f55\u7ee7\u7eed\u89c2\u5bdf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u8bb0\u5f55\u3011\u516c\u53f8\u7684\u670d\u52a1\u5668\u8fd1\u671f\u4e0d\u600e\u4e48\u7a33\u5b9a\uff0c\u4e94\u4e00\u5047\u671f\u90fd\u6ca1\u6d88\u505c\u3002\u5728\u6392\u9664\u786c\u4ef6\u3001\u8f6f\u4ef6\u95ee\u9898\u540e\uff0c\u5f00\u59cb\u68c0\u67e5apache\u914d\u7f6e\u95ee\u9898\u3002<\/p>\n<p>win2003\u7cfb\u7edf\u4e0b\u7684apache\uff0cmpm_winnt.c\u6a21\u5f0f\uff0c\u4f18\u5316\u53c2\u6570\uff1a<\/p>\n<p><strong><a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/mod\/mpm_common.html#threadsperchild\" target=\"_blank\">ThreadsPerChild<\/a><\/strong> \u8bf4\u660e\uff1a\u6bcf\u4e2a\u5b50\u8fdb\u7a0b\u5efa\u7acb\u7684\u7ebf\u7a0b\u6570\uff0c\u9ed8\u8ba4\u503c:64\uff0c\u6700\u5927\u503c:1920\u3002\u7f51\u4e0a\u67e5\u8be2\u8d44\u6599\u5efa\u8bae\u8bbe\u7f6e\u5728100-500\u4e4b\u95f4\u3002\u5982\u670d\u52a1\u5668\u6027\u80fd\u9ad8\uff0c\u53ef\u8bbe\u7f6e\u66f4\u5927\u503c\u3002<\/p>\n<p><strong><a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/mod\/mpm_common.html#maxmemfree\" target=\"_blank\">MaxRequestsPerChild<\/a><\/strong> \u8bf4\u660e\uff1a\u6bcf\u4e2a\u5b50\u8fdb\u7a0b\u5728\u5176\u751f\u5b58\u671f\u5185\u5141\u8bb8\u4f3a\u670d\u7684\u6700\u5927\u8bf7\u6c42\u6570\u91cf\uff0c\u4e5f\u5c31\u662f\u6700\u5927\u7ebf\u7a0b\u3002\u5982\u679c\u8d85\u8fc7\u9650\u5236\uff0c\u5b50\u8fdb\u7a0b\u4f1a\u7ed3\u675f\u3002\u9ed8\u8ba4\u503c\uff1a0\u3002<br \/>\nMaxRequestsPerChild\u7684\u503c\u4e0d\u80fd\u8bbe\u7f6e\u4e3a0\uff0c\u4f1a\u56e0\u5b50\u8fdb\u7a0b\u4e0d\u7ed3\u675f\u800c\u8017\u5c3d\u5185\u5b58\u3002<\/p>\n<p>\u7ebf\u7a0b\u8bbe\u7f6e\u4e5f\u4e0d\u662f\u8d8a\u5927\u8d8a\u597d\uff0c\u592a\u5927\u4f1a\u5bfc\u81f4\u4ea7\u751f\u65b0\u7684\u5b50\u8fdb\u7a0b\u540e\u957f\u671f\u7a7a\u95f2\uff0c\u5e76\u975e\u6700\u4f73\u4f18\u5316\u3002\u8981\u6839\u636e\u670d\u52a1\u5668\u7684\u786c\u4ef6\u914d\u7f6e\u3001\u7cfb\u7edf\u73af\u5883\u3001\u8bbf\u95ee\u6d41\u91cf\u7b49\u8c03\u8bd5\u8bbe\u7f6e\u3002<\/p>\n<p><strong><a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/mod\/mpm_winnt.html\" target=\"_blank\">Win32DisableAcceptEx<\/a><\/strong><br \/>\n\u4f7f\u7528accept()\u4ee3\u66ffAcceptEx()\u63a5\u53d7\u7f51\u7edc\u94fe\u63a5\u3002AcceptEx()\u662f\u4e00\u4e2a\u5fae\u8f6f\u7684WinSock2 API \uff0c\u901a\u8fc7\u4f7f\u7528BSD\u98ce\u683c\u7684accept() API\u63d0\u4f9b\u4e86\u6027\u80fd\u6539\u5584\u3002\u4e00\u4e9b\u6d41\u884c\u7684Windows\u4ea7\u54c1\uff0c\u6bd4\u5982\u9632\u75c5\u6bd2\u8f6f\u4ef6\u6216\u865a\u62df\u4e13\u7528\u7f51\u7edc\u8f6f\u4ef6\uff0c\u4f1a\u5e72\u6270AcceptEx()\u7684\u6b63\u786e\u64cd\u4f5c\u3002<\/p>\n<p>\u4f18\u5316\u540e\u76ee\u524d\u8fd8\u6bd4\u8f83\u7a33\u5b9a\uff0c\u505a\u4e2a\u8bb0\u5f55\u7ee7\u7eed\u89c2\u5bdf\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[97],"class_list":["post-1387","post","type-post","status-publish","format-standard","hentry","category-11","tag-apache"],"_links":{"self":[{"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1387"}],"version-history":[{"count":15,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1387\/revisions"}],"predecessor-version":[{"id":1404,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1387\/revisions\/1404"}],"wp:attachment":[{"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1387"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}