{"id":1400,"date":"2008-09-26T15:44:26","date_gmt":"2008-09-26T15:44:26","guid":{"rendered":"http:\/\/www.icocean.com\/blog\/?p=1400"},"modified":"1970-01-01T07:00:00","modified_gmt":"1970-01-01T07:00:00","slug":"apache%E5%86%85%E5%AD%98%E4%BC%98%E5%8C%96","status":"publish","type":"post","link":"https:\/\/www.icocean.com\/blog\/?p=1400","title":{"rendered":"apache \u5185\u5b58\u4f18\u5316"},"content":{"rendered":"<p>\u6211\u5728\u4e00\u4e2a\u884c\u4e1a\u5e94\u7528\u8f6f\u4ef6\u4e2d\uff0c\u56e0\u4e3a\u4e1a\u52a1\u9700\u6c42\uff08\u76d1\u63a7\u9875\u9762\uff09\u4f7f\u7528ajax\u5b9a\u65f6\u5237\u65b0\u6280\u672f\uff0c\u7531\u4e8e\u8be5\u9875\u9762\u957f\u671f\u8fd0\u884c\uff0c\u5bfc\u81f4\u5185\u5b58\u66b4\u589e\uff0c3\u5929apache.exe,\u5c31\u5360\u7528\u8fd12G,\u901a\u8fc7google\u548c\u767e\u5ea6\u7684\u641c\u7d22\uff0c\u53d1\u73b0\u5f71\u54cdapache\u5185\u5b58\u6027\u80fd\u7684\u4e3b\u8981\u6709\u4e00\u4e0b\u51e0\u4e2a\u53c2\u6570\uff1a<\/p>\n<p>ThreadsPerChild <br \/>MaxRequestsPerChild <br \/>&#8212;&#8212;&#8212;&#8212;-<br \/>KeepAlive<br \/>MaxKeepAliveRequests<br \/>KeepAliveTimeout<\/p>\n<p>\u53c2\u6570\u7b80\u5355\u4ecb\u7ecd\u5982\u4e0b\uff1a<!--more--><\/p>\n<p>ThreadsPerChild\uff1a<\/p>\n<p>\u8fd9\u4e2a\u6307\u4ee4\u8bbe\u7f6e\u4e86\u6bcf\u4e2a\u5b50\u8fdb\u7a0b\u5efa\u7acb\u7684\u7ebf\u7a0b\u6570\u3002\u5b50\u8fdb\u7a0b\u5728\u542f\u52a8\u65f6\u5efa\u7acb\u8fd9\u4e9b\u7ebf\u7a0b\u540e\u5c31\u4e0d\u518d\u5efa\u7acb\u65b0\u7684\u7ebf\u7a0b\u4e86\u3002\u5982\u679c\u4f7f\u7528\u4e00\u4e2a\u7c7b\u4f3c\u4e8empm_winnt\u53ea\u6709\u4e00\u4e2a\u5b50\u8fdb\u7a0b\u7684MPM\uff0c\u8fd9\u4e2a\u6570\u503c\u8981\u8db3\u591f\u5927\uff0c\u4ee5\u4fbf\u53ef\u4ee5\u5904\u7406\u53ef\u80fd\u7684\u8bf7\u6c42\u9ad8\u5cf0\u3002\u5982\u679c\u4f7f\u7528\u4e00\u4e2a\u7c7b\u4f3c\u4e8eworker\u6709\u591a\u4e2a\u5b50\u8fdb\u7a0b\u7684MPM\uff0c\u6bcf\u4e2a\u5b50\u8fdb\u7a0b\u6240\u62e5\u6709\u7684\u6240\u6709\u7ebf\u7a0b\u7684\u603b\u6570\u8981\u8db3\u591f\u5927\uff0c\u4ee5\u4fbf\u53ef\u4ee5\u5904\u7406\u53ef\u80fd\u7684\u8bf7\u6c42\u9ad8\u5cf0\u3002<\/p>\n<p>MaxRequestsPerChild\uff1a<\/p>\n<p>\u8fd9\u4e2a\u53c2\u6570\u662f\u8bf4\uff0capache\u8fdb\u7a0b\u5728\u5904\u7406\u4e86\u591a\u5c11\u4e2a\u8bf7\u6c42\u4e4b\u540e\uff0c\u5fc5\u987b\u9000\u51fa\uff0c\u91cd\u65b0\u5f00\u59cb\uff0c\u4ee5\u514d\u5728\u5904\u7406\u4e2d\u7684\u5185\u5b58\u95ee\u9898\u3002<\/p>\n<p>\u5bf9\u4e8ephp\u811a\u672c\u6765\u8bf4\uff0c\u628a\u8fd9\u4e2a\u53c2\u6570\u8bbe\u7f6e\u7684\u5c0f\u4e00\u4e9b\u662f\u6709\u597d\u5904\u7684\uff0c\u53ef\u4ee5\u907f\u514d\u7a0b\u5e8f\u4f7f\u7528\u7684\u5185\u5b58\u6301\u7eed\u589e\u957f\u5bf9apache\u5e26\u6765\u7684\u538b\u529b\uff1a\u8ba9\u8fd9\u4e2a\u53c2\u6570\u5b9a\u671f\u91ca\u653e\u5185\u5b58\uff0c\u56e0\u4e3aphp\u662f\u5728\u811a\u672c\u6267\u884c\u5b8c\u6bd5\u540e\uff0c\u81ea\u52a8\u91ca\u653e\u53ea\u7528\u7684\u8d44\u6e90\uff08\u5185\u5b58\uff09\u7684\u3002<\/p>\n<p>\u6839\u636e\u8d44\u6599\u5efa\u8bae\uff0c\u53ef\u4ee5\u8bbe\u7f6eMaxRequestsPerChild\u6765\u8fbe\u5230\u5185\u5b58\u81ea\u52a8\u91ca\u653e\u7684\u76ee\u7684\uff0c\u6bd4\u5982\u8bbe\u7f6eThreadsPerChild 250\uff0cMaxRequestsPerChild\u4e3a50\uff1f\u5982\u679c\u592a\u5c0f\u7684\u8bdd\uff0c\u91cd\u65b0\u4ea7\u751f\u4e00\u4e2aapache\u8fdb\u7a0b\u4e5f\u662f\u8981\u6d88\u8017\u8d44\u6e90\u7684\uff0c\u8fd9\u662f\u4e00\u4e2a\u5e73\u8861\u95ee\u9898\u3002<\/p>\n<p>keepAlive\uff1a<\/p>\n<p>KeepAlive \u914d\u7f6e\u6307\u4ee4\u51b3\u5b9a\u5f53\u5904\u7406\u5b8c\u7528\u6237\u53d1\u8d77\u7684 HTTP \u8bf7\u6c42\u540e\u662f\u5426\u7acb\u5373\u5173\u95ed TCP \u8fde\u63a5\uff0c\u5982\u679c KeepAlive \u8bbe\u7f6e\u4e3aOn\uff0c\u90a3\u4e48\u7528\u6237\u5b8c\u6210\u4e00\u6b21\u8bbf\u95ee\u540e\uff0c\u4e0d\u4f1a\u7acb\u5373\u65ad\u5f00\u8fde\u63a5\uff0c\u5982\u679c\u8fd8\u6709\u8bf7\u6c42\uff0c\u90a3\u4e48\u4f1a\u7ee7\u7eed\u5728\u8fd9\u4e00\u6b21 TCP \u8fde\u63a5\u4e2d\u5b8c\u6210\uff0c\u800c\u4e0d\u7528\u91cd\u590d\u5efa\u7acb\u65b0\u7684 TCP \u8fde\u63a5\u548c\u5173\u95edTCP \u8fde\u63a5\uff0c\u53ef\u4ee5\u63d0\u9ad8\u7528\u6237\u8bbf\u95ee\u901f\u5ea6\u3002\u6240\u4ee5\u6253\u5f00keepAlive\u65f6\uff0c\u8bf7\u6839\u636e\u81ea\u5df1\u9875\u9762\u7684\u8bbf\u95ee\u91cf\u3001\u9875\u9762\u6570\u636e\u7c7b\u578b\u6765\u8bbe\u7f6eMaxKeepAliveRequests\u548cKeepAliveTimeout\u3002\u5c24\u5176\u662fKeepAliveTimeout\uff0c\u6839\u636e\u4f60\u9875\u9762\u5185\u5305\u542b\u7684\u5185\u8054\u7684.js\u548c\u56fe\u7247\uff0c\u8bbe\u7f6e\u9002\u5f53\u5927\u5c0f\u3002\u5982\u679c\u5185\u8054\u6587\u4ef6\u8f83\u591a\uff0c\u5efa\u8bae\u8bbe\u7f6eMaxKeepAliveRequests\u548cKeepAliveTimeout\u90fd\u5927\u4e00\u4e9b\uff0c\u5982\u679c\u5927\u90e8\u5206\u5185\u5bb9\u90fd\u5728\u4e00\u4e2a\u9875\u9762\u91cc\uff0c\u8bbe\u7f6e\u5c0f\u4e00\u4e9b\u53ef\u80fd\u6027\u80fd\u66f4\u597d\u3002<\/p>\n<p>\u901a\u8fc7\u4fee\u6539\u4ee5\u4e0a\u51e0\u4e2a\u53c2\u6570\uff0capache\u5185\u5b58\u4e0d\u5728\u66b4\u6da8\u4e86\uff0c\u5475\u5475\uff0c\u6211\u8bbe\u7f6eThreadsPerChild 250\uff0cMaxRequestsPerChild 50\uff0cMaxKeepAliveRequests 50\uff0cKeepAliveTimeout 5 \uff0c\u73b0\u5728\u9875\u9762\u8fde\u5f00\u51e0\u5929\u90fd\u6ca1\u6709\u66b4\u6da8\u60c5\u51b5\u4e86\u3002<\/p>\n<p>\u76ee\u524d\uff0c\u6b63\u5728\u914d\u7f6e\u6211\u4e2a\u4eba\u7684\u670d\u52a1\u5668\uff0c\u4ee5\u540e\u4f1a\u9646\u7eed\u53d1\u51e0\u7bc7freebsd+apache+php+mysql\u7684\u914d\u7f6e\u6587\u7ae0\uff0c\u5f00\u59cb\u505a\u81ea\u5df1\u7684\u884c\u4e1a\u7f51\u7ad9sosofun.cn\u3002\u5316\u5de5\u5546\u52a1\u7f51 hg35.com \u548c \u4e2d\u56fd\u5927\u67a3\u7f51 dazao.net\u3002\u7533\u8bf7\u843d\u4f0d\uff0c\u5f80\u7ba1\u7406\u5458\u6279\u51c6\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u5728\u4e00\u4e2a\u884c\u4e1a\u5e94\u7528\u8f6f\u4ef6\u4e2d\uff0c\u56e0\u4e3a\u4e1a\u52a1\u9700\u6c42\uff08\u76d1\u63a7\u9875\u9762\uff09\u4f7f\u7528ajax\u5b9a\u65f6\u5237\u65b0\u6280\u672f\uff0c\u7531\u4e8e\u8be5\u9875\u9762\u957f\u671f\u8fd0\u884c\uff0c\u5bfc\u81f4\u5185\u5b58\u66b4\u589e\uff0c3 <a href='https:\/\/www.icocean.com\/blog\/?p=1400' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[638,1940,1938,1941,1942,1939,347],"class_list":["post-1400","post","type-post","status-publish","format-standard","hentry","category-lamp","tag-apache","tag-child","tag-keepalive","tag-max","tag-requests","tag-threads","tag-347","category-24-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1400"}],"version-history":[{"count":0,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1400\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}