{"id":199714,"date":"2020-11-06T09:15:54","date_gmt":"2020-11-06T01:15:54","guid":{"rendered":"http:\/\/4563.org\/?p=199714"},"modified":"2020-11-06T09:15:54","modified_gmt":"2020-11-06T01:15:54","slug":"php-fpm-%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%86%85%e5%ad%98%e5%8d%a0%e7%94%a8%e9%99%a1%e5%9d%a1%e5%bc%8f%e4%b8%8a%e6%b6%a8%ef%bc%8c%e8%af%b7%e9%97%ae%e5%a6%82%e4%bd%95%e5%bd%bb%e5%ba%95%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=199714","title":{"rendered":"PHP -fpm \u670d\u52a1\u5668\u5185\u5b58\u5360\u7528\u9661\u5761\u5f0f\u4e0a\u6da8\uff0c\u8bf7\u95ee\u5982\u4f55\u5f7b\u5e95\u89e3\u51b3\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  PHP -fpm \u670d\u52a1\u5668\u5185\u5b58\u5360\u7528\u9661\u5761\u5f0f\u4e0a\u6da8\uff0c\u8bf7\u95ee\u5982\u4f55\u5f7b\u5e95\u89e3\u51b3\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : reyleon <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u6211\u624b\u4e0a\u7ef4\u62a4\u7740\u4e24\u53f0 Web \u670d\u52a1\u5668\uff0c\u540e\u7aef\u8fd0\u884c\u7684\u662f PHP \u63a5\u53e3\u670d\u52a1\uff0c\u670d\u52a1\u5668\u914d\u7f6e\u4e3a 8 \u6838 16G\uff0cPHP \u7248\u672c\u4e3a 5.6.40 \uff0c\u8fd0\u884c\u5728 PHP-FPM \u6a21\u5f0f\u4e0b\uff0cphp-fpm \u8fdb\u7a0b\u7684\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u968f\u7740\u8bf7\u6c42\u6570\u7684\u589e\u52a0\u800c\u4e0d\u65ad\u4e0a\u6da8\uff0c\u7cfb\u7edf\u53ef\u7528\u5185\u5b58\u5448\u9661\u5761\u5f0f\u4e0b\u964d\uff0c\u4e00\u4e0d\u7559\u795e\u5c31\u4f1a\u6709\u5185\u5b58\u544a\u8b66\u4f46\u6211\u4eec\u53c8\u5904\u7406\u4e0d\u591f\u53ca\u65f6\u800c\u5bfc\u81f4\u4e1a\u52a1\u5954\u6e83\u7684\u53ef\u80fd\u3002<\/p>\n<p>\u8fd9\u4e2a\u95ee\u9898\u8ba9\u6211\u9eef\u7136\u4f24\u795e\uff0c\u4e0d\u77e5\u8be5\u5982\u4f55\u662f\u597d\uff1f<\/p>\n<p>\u6211\u67e5\u4e86\u4e00\u4e0b\uff0c\u51e0\u4e4e\u5168\u7f51\u90fd\u5728\u544a\u8bc9\u4f60\u8c03\u6574 php-fpm \u8fd0\u884c\u6a21\u5f0f\uff0c\u5982 pm \u6539\u4e3a dynamic \u6216 static \u4ee5\u53ca\u8c03\u6574 php-fpm \u5b50\u8fdb\u7a0b\u6570\u91cf\uff0c\u6216\u8005\u5c31\u662f\u8ba9\u4f60\u8c03\u4f4e pm.max_requests \u7684\u503c\uff0c\u8ba9\u5b83\u8fbe\u5230\u8bf7\u6c42\u6570\u65f6\u81ea\u52a8\u9500\u6bc1\u8fdb\u7a0b\u4ee5\u91ca\u653e\u5185\u5b58\u3002<\/p>\n<p>\u6211\u4eec\u5c31\u662f\u8fd9\u4e48\u505a\u7684\uff0c\u867d\u7136\u6709\u70b9\u7528\uff0c\u4f46\u8fd9\u660e\u663e\u4e0d\u662f\u6cbb\u672c\u7684\u529e\u6cd5\uff0c\u8fd9\u53ea\u662f\u4e00\u79cd\u59a5\u534f\u3002<\/p>\n<p>\u8ba9\u6211\u7591\u60d1\u7684\u662f\uff0c\u5bf9\u4e8e\u5185\u5b58\u7684\u91ca\u653e\uff0c\u6211\u4e5f\u67e5\u5230\u4e0d\u540c\u7684\u8bf4\u6cd5\uff1a<\/p>\n<p>\u8bf4\u6cd5\u4e00\uff08\u6765\u81ea Swoole \u5b98\u65b9\u5fae\u4fe1\u516c\u4f17\u53f7\uff09<\/p>\n<p>FPM \u81ea\u5e26\u9ed1\u9b54\u6cd5\uff0c\u4f20\u7edf\u7684\u8dd1\u5728 FPM \u4e0b\u7684 PHP \u4ee3\u7801\u662f\u6ca1\u6709\u201c\u5185\u5b58\u6cc4\u6f0f\u201d\u4e00\u8bf4\u7684\u3002\u56e0\u4e3a PHP \u5185\u6838\u6709\u4e00\u4e2a\u5173\u952e\u51fd\u6570\u53eb\u505a php_request_shutdown\uff0c\u6b64\u51fd\u6570\u4f1a\u5728\u8bf7\u6c42\u7ed3\u675f\u540e\uff0c\u628a\u8bf7\u6c42\u671f\u95f4\u7533\u8bf7\u7684\u6240\u6709\u5185\u5b58\u90fd\u91ca\u653e\u6389\uff0c\u8fd9\u4ece\u6839\u672c\u4e0a\u675c\u7edd\u4e86\u5185\u5b58\u6cc4\u6f0f\u3002<\/p>\n<p>\u8bf4\u6cd5\u4e8c\uff08\u6765\u81ea PHP \u5f00\u53d1\u7ec4\u6838\u5fc3\u6210\u5458\u535a\u5ba2\uff09<\/p>\n<p>PHP \u4e4b\u6240\u4ee5\u4f1a\u5728\u8bf7\u6c42\u7ed3\u675f\u540e\u6b63\u786e\u7684\u91ca\u653e\u6389\u6240\u6709\u7684\u8d44\u6e90\uff0c\u5185\u5b58\uff0c\u8fd9\u662f\u56e0\u4e3a\u5f53\u6211\u4eec\u5728\u811a\u672c\u4e2d\u4f7f\u7528\u65b0\u7684\u5185\u5b58\u7684\u65f6\u5019\uff0cPHP \u4f1a\u5411 OS \u7533\u8bf7\u4e00\u5927\u5757\u5185\u5b58(ZEND_MM_SEG_SIZE \u5927\u5c0f)\uff0c\u7136\u540e\u5206\u7ed9\u4f60\u4f60\u9700\u8981\u7684\u5408\u9002\u7684\u4e00\u5757\u5c0f\u5185\u5b58\u3002<\/p>\n<p>\u5f53\u4f60\u4e0d\u4f7f\u7528\u8fd9\u5757\u5c0f\u5185\u5b58\u7684\u65f6\u5019\uff0cPHP \u4e5f\u4e0d\u4f1a\u8fd4\u8fd8\u7ed9 OS\uff0c\u800c\u662f\u4fdd\u7559\u4e0b\u6765\u7ed9\u540e\u7eed\u7684\u5904\u7406\u4f7f\u7528\u3002\u6240\u4ee5\uff0c\u5982\u679c\u4f60\u4f7f\u7528\u5b8c\u4e86\u8d44\u6e90\u4e0d\u53ca\u65f6\u91ca\u653e\uff0c\u90a3\u4e48\u540e\u7eed\u7684\u903b\u8f91\u5982\u679c\u8bf7\u6c42\u5185\u5b58\uff0cPHP \u53d1\u73b0\u4e4b\u524d\u7533\u8bf7\u7684\u4e00\u5927\u5757\u5185\u5b58\u5df2\u7ecf\u5206\u5149\u4e86\uff0c\u5b83\u5c31\u53ea\u597d\u518d\u6b21\u5411 OS \u53d1\u8d77 malloc \u8c03\u7528\uff0c\u5f97\u5230\u4e00\u5757\u65b0\u7684\u5927\u5185\u5b58\u3002 \u5e76\u4e14\u5b83\u8fd8\u9700\u8981\u5bf9\u8fd9\u4e2a\u5927\u5185\u5b58\u505a\u4e00\u4e9b\u6807\u8bb0\u5904\u7406\u3002<\/p>\n<p>\u800c\u5982\u679c\u4f60\u4f7f\u7528\u5b8c\u8d44\u6e90\uff0c\u53ca\u65f6\u91ca\u653e\u7684\u8bdd\uff0c\u90a3\u4e48\u4e0b\u6b21\u811a\u672c\u7533\u8bf7\u5185\u5b58\u7684\u65f6\u5019\uff0c\u4f60\u4e4b\u524d\u5f52\u8fd8\u7684\u5185\u5b58\u5757\u5c31\u53ef\u4ee5\u88ab\u91cd\u590d\u5229\u7528\uff0c\u90a3\u4e48\u4e5f\u8bb8\u4f60\u7684\u6574\u4e2a\u811a\u672c\u53ea\u9700\u8981\u548c OS \u7533\u8bf7\u4e00\u6b21\u5185\u5b58\u3002<\/p>\n<p>\u5982\u679c\u4f60\u4e70\u4e86\u4e00\u672c PHP \u7684\u4e66\uff0c\u5b83\u544a\u8bc9\u4f60: \u201c\u4e0d\u7528\u5728 PHP \u4e3b\u52a8\u91ca\u653e\u8d44\u6e90\uff0c\u56e0\u4e3a PHP \u4f1a\u5e2e\u4f60\u91ca\u653e\u201d\u7684\u8bdd\uff0c\u6211\u5efa\u8bae\u4f60\uff0c\u70e7\u4e86\u5b83\u3002<\/p>\n<p>\u8bf4\u6cd5\u4e09\uff08\u6765\u81ea PHP \u5b98\u65b9\u624b\u518c\uff09<\/p>\n<p>\u5f15\u7528\u8ba1\u6570\u7cfb\u7edf\u662f Zend \u5f15\u64ce\u7684\u4e00\u90e8\u5206\uff0c\u53ef\u4ee5\u81ea\u52a8\u68c0\u6d4b\u5230\u4e00\u4e2a\u8d44\u6e90\u4e0d\u518d\u88ab\u5f15\u7528\u4e86\uff08\u548c Java \u4e00\u6837\uff09\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b\u6b64\u8d44\u6e90\u4f7f\u7528\u7684\u6240\u6709\u5916\u90e8\u8d44\u6e90\u90fd\u4f1a\u88ab\u5783\u573e\u56de\u6536\u7cfb\u7edf\u91ca\u653e\u3002\u56e0\u6b64\uff0c\u5f88\u5c11\u9700\u8981\u624b\u5de5\u91ca\u653e\u5185\u5b58\u3002<\/p>\n<p>\u4ee5\u4e0a\u8bf4\u6cd5\uff0c\u4e0d\u77e5\u9053\u54ea\u4e2a\u662f\u6b63\u786e\u7684\u3002\u4f46\u4e8b\u5b9e\u662f\u5b58\u5728\u7684\uff0cphp-fpm \u8fdb\u7a0b\u7684\u5185\u5b58\u4f7f\u7528\u5c31\u662f\u4f1a\u4e0a\u6da8\u3002<\/p>\n<p>\u6709\u6ca1\u6709\u5927\u795e\u6307\u70b9\u4e00\u4e0b\uff0c\u5982\u4f55\u6df1\u5165\u5206\u6790\u5185\u5b58\u4e0a\u6da8\u7684\u539f\u56e0\uff1f\u5047\u8bbe\u8981\u6df1\u5165 PHP \u4ee3\u7801\uff0c\u6709\u6ca1\u6709\u884c\u4e4b\u6709\u6548\u7684\u5206\u6790\u5de5\u5177?<\/p>\n<p>\uff08\u6ce8\uff1a\u6211\u4e0d\u662f php \u7a0b\u5e8f\u5458\uff09\u3002      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>61<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4261989\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hbolive <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ca1\u7814\u7a76\u8fc7\uff0c\u53ea\u80fd\u51ed\u611f\u89c9\u8bf4\u4e0b\u3002<br \/>\u5176\u5b9e\u8bf4\u6cd5\u4e8c\u548c\u4e09\u5e76\u4e0d\u51b2\u7a81\uff0cPHP \u786e\u5b9e\u4f1a\u81ea\u52a8\u91ca\u653e\u5185\u5b58\u3002\u8bf4\u6cd5\u4e8c\u7684\u610f\u601d\u4f30\u8ba1\u662f\uff1aPHP \u5e76\u4e0d\u4f1a\u7acb\u523b\u91ca\u653e\u4e0d\u9700\u8981\u7684\u8d44\u6e90\uff0c\u800c\u5982\u679c\u9891\u7e41\u7684\u7533\u8bf7\u5185\u5b58\uff0c\u5bfc\u81f4\u539f\u5148\u7684\u65e0\u7528\u7684\u8d44\u6e90\u8fd8\u6ca1\u6765\u5f97\u53ca\u91ca\u653e\uff0c\u6240\u4ee5 PHP \u53ea\u80fd\u53bb\u7533\u8bf7\u65b0\u7684\u5185\u5b58\u3002\u3002<br \/>\u6c34\u5e73\u6709\u9650\uff0c\u4ee5\u4e0a\u7eaf\u5c5e\u731c\u6d4b\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4261990\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wei745359223 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u79cd\u60c5\u51b5\u4e5f\u6709\u53ef\u80fd\u662f\u4ee3\u7801\u4e0a\u51fa\u4e86\u95ee\u9898\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4261991\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lbp0200 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             PHP \u5c31\u662f\u8fd9\u6837\u7684\u5f02\u6b65\u5904\u7406\u6a21\u578b\uff0c\u4e00\u4e2a\u8bf7\u6c42\u4e00\u4e2a\u8fdb\u7a0b\uff0c1000 \u4e2a\u5e76\u53d1\u5c31\u662f 1000 \u4e2a PHP \u8fdb\u7a0b\uff0c\u8bf7\u6c42\u7ed3\u675f\uff0c\u8fdb\u7a0b\u5173\u95ed\u3002<\/p>\n<p>\u6240\u4ee5\uff0cNGINX \u540e\u9762\u4f7f\u7528\u591a\u4e2a PHP \u670d\u52a1\u5668\uff0c\u5c31\u662f\u52a0\u673a\u5668\uff0c\u8fd9\u6837\u4e1a\u52a1\u5cf0\u503c\u7684\u65f6\u5019\uff0c\u5c31\u4e0d\u4f1a\u5d29\u6e83\u4e86\u3002<\/p>\n<p>1 \u53f0 PHP \u673a\u5668\u4e0d\u591f\uff0c\u5c31 2 \u53f0\uff0c\u6ca1\u6709\u4e00\u4e07\u53f0\u670d\u52a1\u5668\u89e3\u51b3\u4e0d\u4e86\u7684\u95ee\u9898\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4261992\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dawniii <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7b2c\u4e09\u65b9\u6269\u5c55\u662f\u53ef\u80fd\u5b58\u5728\u5185\u5b58\u6cc4\u9732\u7684\uff0c\u4e4b\u524d\u9047\u5230\u8fc7 curl \u67d0\u4e2a\u7248\u672c\u6709\u95ee\u9898\uff0c\u5347\u7ea7\u5c31\u597d\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4261993\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zpfhbyx <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lbp0200 \u4f60\u8fd9\u522b\u8bef\u5bfc\u4eba\u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4261994\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : young <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5927\u6982\u7387\u4ee3\u7801\u95ee\u9898, \u4e4b\u524d\u7528 xhprof \u5206\u6790\u8fc7\u4ee3\u7801<br \/>https:\/\/www.php.net\/manual\/en\/book.xhprof.php                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4261995\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dawniii <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dawniii \u4e4b\u524d curl \u662f cpu \u6da8\uff0c\u8fd8\u4e0d\u662f\u5185\u5b58\u3002\u5185\u5b58\u51fa\u95ee\u9898\uff0c\u57fa\u672c\u6ca1\u9047\u5230\u3002\u53ef\u4ee5\u770b\u770b\u6570\u636e\u7edf\u8ba1\u662f\u7edf\u8ba1\u7684\u771f\u5b9e\u5360\u7528\u7684\u7269\u7406\u5185\u5b58\uff0c\u8fd8\u662f\u5e26 buffer \u7684\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4261996\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sgq1128 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6bcf\u5929\u51cc\u6668\u5b9a\u65f6\u91cd\u542f\u4e0b\u5457                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4261997\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : buaacss <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             php \u5f88\u591a c \u7684\u6269\u5c55\u90fd\u6709\u5185\u5b58\u6cc4\u6f0f\u7684 bug\uff0c\u53ef\u4ee5\u7528 valgrind \u8bd5\u8bd5\uff0c\u5982\u679c\u5185\u6838\u652f\u6301\u7684\u8bdd epbf \u4e5f\u6709\u76f8\u5e94\u7684\u5de5\u5177\u6765\u770b\u5185\u5b58\u6cc4\u6f0f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4261998\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nuk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e00\u822c\u60c5\u51b5\uff0c\u6bcf\u4e2a php \u7684 process \u4f1a\u52a0\u8f7d\u5f88\u591a\u5e93\uff0c\u53ef\u4ee5\u8bd5\u8bd5 preload \u4e00\u4e9b\u5185\u5b58\u5360\u7528\u6bd4\u8f83\u591a\u7684\u5e93<br \/>\u8fd9\u6837\u5c31\u53ef\u4ee5\u5171\u4eab\u5185\u5b58\u4f7f\u7528\u4e86\uff0c\u53ef\u4ee5\u5c11\u5f88\u591a\u5185\u5b58\uff0c\u4e0d\u8fc7\u4ec5\u9650 7.4 \u4ee5\u4e0a<br \/>\u6211\u4e4b\u524d\u5728 php5 \u4e0a\u505a\u8fc7\u7c7b\u4f3c\u7684\u4e1c\u897f\uff0c\u6211\u4eec\u81ea\u5df1\u7684\u670d\u52a1\u5668\u5927\u6982\u4e00\u4e2a php \u8fdb\u7a0b\u80fd\u5c11 100M \u5de6\u53f3\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4261999\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ben1024 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @nuk <br \/>\u201c\u4e00\u4e2a php \u8fdb\u7a0b\u80fd\u5c11 100M \u5de6\u53f3\u201d , \u597d\u5947\u4f60\u4eec\u4e00\u4e2a\u8fdb\u7a0b\u5e73\u5747\u662f\u591a\u5c11\u5185\u5b58                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262000\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ben1024 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6392\u67e5\u4e0b\u4ee3\u7801\u4e2d\u662f\u5426\u6709\u957f\u8fde\u63a5\u6ca1\u6709\u91ca\u653e\uff0c\u4f8b\u5982 mongodb \u4e00\u7c7b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262001\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sagaxu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             php \u6269\u5c55\u826f\u83a0\u4e0d\u9f50\uff0c\u5185\u5b58\u6cc4\u9732\u548c coredump \u662f\u5bb6\u5e38\u4fbf\u996d\uff0cpm.max_requests \u8c03\u5230 100 \u4fdd\u5e73\u5b89                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262002\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nuk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ben1024 \u5982\u679c\u5565\u4e8b\u90fd\u4e0d\u5e72\u7684\u8bdd\u5927\u6982 100M \u5de6\u53f3\uff0c\u5904\u7406\u8bf7\u6c42\u7684\u8bdd\u5927\u6982\u591a\u52a0 10~20M \u5de6\u53f3\u5427\uff0c\u5982\u679c php5 \u628a\u8be5\u52a0\u8f7d\u7684\u63d0\u524d\u52a0\u8f7d\u597d\uff0c\u4e00\u4e2a 100ms \u7684\u8bf7\u6c42\u53ef\u4ee5\u4f18\u5316\u5230 10ms \u5de6\u53f3\u3002<br \/>\u4e0d\u8fc7\u73b0\u5728\u6211\u4eec\u6362 php7 \u4e86\u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262003\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ben1024 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @nuk <br \/>\u6ca1\u6709\u903b\u8f91\u5904\u7406\u65f6\u5e94\u7528\u8fdb\u7a0b\u8fbe\u5230 100M \u611f\u89c9\u6709\u70b9\u5927\uff0c<br \/>php7 \u7684\u9884\u52a0\u8f7d\u662f\u4e0d\u9519\uff0c\u4f7f\u7528\u6848\u4f8b\u592a\u5c11                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262004\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nuk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ben1024 \u5f88\u4e45\u4ee5\u524d\u7684\u7cfb\u7edf\u4e86\uff0c\u6240\u6709\u7684\u4e1a\u52a1 php \u7b2c\u4e00\u53e5\u90fd\u662f include \u6240\u6709\u7684\u6a21\u5757\uff0c\u4e0d\u8fc7\u6211\u4eec\u73b0\u5728\u5df2\u7ecf\u5dee\u4e0d\u591a\u91cd\u6784\u5b8c\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262005\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nuk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ben1024 \u6211\u4eec 48 \u6838\u5fc3 64G \u7684\u670d\u52a1\u5668\uff0c1000 \u5e76\u53d1\u5c31\u70b8\u4f60\u6562\u4fe1\u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262006\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ben1024 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @nuk <br \/>\u9707\u60ca\uff0cinclude \u662f\u633a\u8001\u7684\u9879\u76ee\u7684\uff0c\u547d\u540d\u7a7a\u95f4\u90fd\u6ca1\u7528<br \/>\u5e76\u53d1\u6570\u5bf9\u4e0d\u8d77\u8fd9\u786c\u4ef6\u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262007\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuxu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u90fd\u662f\u5bf9\u7684<\/p>\n<p>\u9996\u5148\u5185\u5b58\u786e\u5b9e\u662f zend \u4e00\u6b21\u7533\u8bf7\u4e00\u5757\u5927\u5185\u5b58\uff0c\u800c\u4e0d\u662f\u7cfb\u7edf\u8c03\u7528\uff0c\u56e0\u4e3a\u7cfb\u7edf\u8c03\u7528\u4ee3\u4ef7\u5f88\u9ad8<br \/>php \u811a\u672c\u4ee3\u7801\u91ca\u653e\u6389\u7684\u5185\u5b58\u4e5f\u662f\u7ed9\u4e86 zend \u5185\u6838\uff0c\u800c\u4e0d\u662f\u8fd8\u7ed9\u7cfb\u7edf<br \/>\u5f15\u7528\u8ba1\u6570\u91ca\u653e\u6389\u7684\u5185\u5b58\u548c php_request_shutdown \u91ca\u653e\u6389\u7684\u5185\u5b58\u90fd\u662f\u8fd8\u7ed9 zend\uff0czend \u4e0d\u8fd8\u7ed9\u7cfb\u7edf<\/p>\n<p>fpm \u7684\u8fd0\u884c\u539f\u7406\u662f\uff1a<br \/>a. fpm \u662f\u591a\u8fdb\u7a0b\u7684\uff0c\u662f\u540c\u6b65 io\uff0c\u4e5f\u5c31\u662f php \u811a\u672c\u4ee3\u7801\u8c03\u7528 io \u8bf7\u6c42\u4f1a\u963b\u585e\uff0c\u4f8b\u5982 http \u8bf7\u6c42\uff0cmysql \u8bf7\u6c42\uff0c\u6587\u4ef6\u8bfb\u5199<br \/>b. fpm \u7684\u6bcf\u4e2a\u8fdb\u7a0b\u6709\u81ea\u5df1\u7684 zend \u5185\u6838\u5728\u8fd0\u884c\uff0c\u6bcf\u4e2a\u8fdb\u7a0b\u7ef4\u62a4\u81ea\u5df1\u7684\u5185\u5b58\u5757<br \/>c. fpm \u53ef\u4ee5\u8bbe\u7f6e\u6700\u5927\u8fdb\u7a0b\u6570\uff0c\u907f\u514d\u5185\u5b58\u4f7f\u7528\u8fc7\u9ad8\uff0c\u4f8b\u5982 20 \u4e2a\uff0c\u4e0d\u7528\u8bbe\u7f6e\u592a\u5927\uff0c\u56e0\u4e3a cpu \u4e0a\u4e0b\u6587\u5207\u6362\u5728\u9ad8\u5e76\u53d1\u65f6\u8fd4\u800c\u4f1a\u6d88\u8017\u5927\u91cf cpu\uff0c\u5177\u4f53\u6839\u636e\u4e1a\u52a1\u8bf7\u6c42\u963b\u585e io \u8c03\u6574<br \/>d. fpm \u53ef\u4ee5\u8bbe\u7f6e\u6bcf\u4e2a\u8fdb\u7a0b\u53ef\u4ee5\u63a5\u53d7\u7684\u8bf7\u6c42\u6570\uff0c\u8d85\u8fc7\u8fd9\u4e2a\u8bf7\u6c42\u6570\u5c31\u7ed3\u675f\u8fdb\u7a0b\u91cd\u65b0\u518d\u8d77\u4e00\u4e2a\uff0c\u907f\u514d\u5185\u5b58\u6cc4\u9732<\/p>\n<p>\u6839\u636e\u4ee5\u4e0a\u53ef\u77e5\uff0c\u60f3\u8c03\u6574 fpm\uff0c\u9700\u8981\u5173\u6ce8\u5185\u5b58\u548c\u63a5\u6536\u5e76\u53d1\u7684\u80fd\u529b\uff0c\u6587\u6863\uff1a https:\/\/www.php.net\/manual\/zh\/install.fpm.configuration.php<\/p>\n<p>\u4e0b\u9762\u7ed9\u51fa\u4f8b\u5b50\uff1a<br \/>1. \u4e3b\u4e3a\u4e86\u907f\u514d\u5185\u5b58\u4e00\u76f4\u5360\u7528\uff0c\u9700\u8981\u9650\u5236 php \u8fdb\u7a0b\u6570\u3002\u6839\u636e\u4e3b\u7684\u786c\u4ef6\u914d\u7f6e\uff0c\u76ee\u524d\u4e0d\u77e5\u9053\u4e3b\u7684\u4e1a\u52a1\uff0c\u8fd9\u91cc\u7ed9\u51fa\u5047\u8bbe\u3002<br \/>2. \u8bbe\u7f6e pm \u4e3a dynamic\uff0c\u7136\u540e\u8bbe\u7f6e max_children \u4e3a 64\uff0c\u8fd9\u6837\u53ef\u4ee5\u9650\u5236 fpm \u6700\u5927\u542f\u7528 64 \u4e2a\u8fdb\u7a0b\u3002<br \/>3. \u8bbe\u7f6e start_servers \u4e3a 16\uff0c\u4e3a fpm \u542f\u52a8\u65f6\u4e3a 16 \u4e2a\u8fdb\u7a0b\uff0c\u8fd9\u6837 fpm \u53ef\u540c\u65f6\u5904\u7406 16 \u4e2a\u8bf7\u6c42\u3002<br \/>4. \u8bbe\u7f6e min_spare_servers \u4e3a 16\uff0c\u8fd9\u6837\u7a7a\u95f2\u65f6\u6700\u5c0f\u4e3a 16 \u4e2a\u8fdb\u7a0b\uff0cmax_spare_servers \u4e3a 32\uff0c\u7a7a\u95f2\u65f6\u6700\u5927\u4e3a 32 \u4e2a\u8fdb\u7a0b\u3002\u81f3\u4e8e fpm \u7a7a\u95f2\u65f6\u5230\u5e95\u4f1a\u56e0\u4e3a\u4ec0\u4e48\u539f\u56e0\u5728\u8fd9\u4e2a\u533a\u95f4\u4f38\u7f29\uff0c\u7b49\u6211\u6709\u65f6\u95f4\u770b\u4e86\u76f8\u5173\u5185\u6838\u6e90\u7801\u518d\u8bf4\u3002\u3002<br \/>5. \u8bbe\u7f6e max_requests \u4e3a 10240\uff0c\u4e3a\u6bcf\u4e2a\u8fdb\u7a0b\u5904\u7406 10240 \u4e2a\u8bf7\u6c42\u8fdb\u7a0b\u5c31\u7ed3\u675f\u8fdb\u7a0b\u91cd\u542f\u8d77\u4e00\u4e2a\u65b0\u7684\uff0c\u907f\u514d\u5185\u5b58\u6cc4\u9732\u3002<\/p>\n<p>\u6ce8\uff1a\u53ef\u4ee5\u6839\u636e xhprof \uff08 php7 \u53ef\u4ee5\u4f7f\u7528 Tideways \uff09\u505a\u5206\u6790                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262008\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuxu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liuxu \u5982\u679c\u4e3b\u8bbe\u7f6e\u7684\u8fdb\u7a0b\u6570\u540e\uff0c\u53d1\u73b0\u5e76\u53d1\u53d8\u4f4e\uff0ccpu \u8d1f\u8f7d\u6d88\u8017\u4e5f\u4f4e\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u5927\u6570\u503c\u3002\u5927\u6982\u5c31\u662f 1s \u5185\uff0c100ms \u662f cpu \u8fd0\u884c\uff0c900ms \u662f io \u7b49\u5f85\u7684\u8bdd\uff0c\u53ef\u4ee5\u628a 1 \u4e2a\u8fdb\u7a0b\u8c03\u6574\u5230 5-10 \u4e2a\u8fdb\u7a0b\u3002\u81f3\u4e8e\u4e3a\u4ec0\u4e48\u4e0d\u662f\u76f4\u63a5 10 \u4e2a\u8fdb\u7a0b\uff0c\u662f\u56e0\u4e3a\u8003\u8651\u8fdb\u7a0b\u6570\u591a\u4e86 cpu \u4e0a\u4e0b\u6587\u5207\u6362\u5e26\u6765\u7684\u6d88\u8017\uff0c\u6709\u65f6\u5019 10 \u4e2a\u8fdb\u7a0b\u8fd8\u6ca1\u6709 8 \u4e2a\u8fdb\u7a0b\u5e76\u53d1\u9ad8\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262009\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wangritian <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             max_requests \u6211\u89c9\u5f97\u5e76\u4e0d\u662f\u59a5\u534f\uff0c\u800c\u662f\u9488\u5bf9\u5927\u91cf\u4e0d\u53ef\u63a7\u4ee3\u7801\u7684\u6700\u6709\u6548\u65b9\u6848<br \/>\u5982\u679c\u4f60\u60f3\u6df1\u7a76\uff0c\u5efa\u8bae\u5206\u6790\u4e1a\u52a1\u4ee3\u7801\uff0c\u901a\u8fc7\u538b\u529b\u6d4b\u8bd5\u5b9a\u4f4d\u5230\u6cc4\u9732\u5185\u5b58\u7684\u51fd\u6570\uff0c\u5982\u679c\u662f\u7b2c\u4e09\u65b9\u7c7b\u5f15\u8d77\u7684\uff0c\u4ed4\u7ec6\u8bfb\u4e00\u4e0b\u4ed6\u7684\u6587\u6863\uff0c\u662f\u5426\u5fd8\u8bb0\u91ca\u653e\u5bf9\u8c61\u6216\u67d0\u4e9b\u5173\u952e\u65b9\u6cd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262010\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Evilk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lbp0200 \u4f60\u7684&#8221; Reply 3<br \/>lbp0200 2 \u5c0f\u65f6 43 \u5206\u949f\u524d<br \/>PHP \u5c31\u662f\u8fd9\u6837\u7684\u5f02\u6b65\u5904\u7406\u6a21\u578b\uff0c\u4e00\u4e2a\u8bf7\u6c42\u4e00\u4e2a\u8fdb\u7a0b\uff0c1000 \u4e2a\u5e76\u53d1\u5c31\u662f 1000 \u4e2a PHP \u8fdb\u7a0b\uff0c\u8bf7\u6c42\u7ed3\u675f\uff0c\u8fdb\u7a0b\u5173\u95ed&#8221;<br \/>\u770b\u5f97\u51fa\u6765,\u4f60\u5bf9 PHP \u7684\u8ba4\u8bc6,\u8fd8\u662f\u6bd4\u8f83\u8001\u65e7,\u5efa\u8bae\u66f4\u65b0\u4e0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262011\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fenglangjuxu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u89c9\u5f97\u5347\u7ea7 php \u5230 7 \u53ef\u80fd\u6bd4\u8f83\u7b80\u5355\u70b9.\u5f53\u7136\u53ef\u80fd\u8fd8\u5f97\u4fee\u6539\u4e00\u4e9b\u4ee3\u7801\u4e0d\u517c\u5bb9\u7684\u5730\u65b9.<br \/>debug \u5de5\u5177 \u53ef\u4ee5\u8bd5\u4e0b\u8fd9\u4e2a phptrace 360 \u51fa\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262012\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sunznx <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u62db\u4e2a php \u7684\u7ef4\u62a4\u4e0d\u884c\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262013\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : pigfly123 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1. \u68c0\u67e5 fpm \u914d\u7f6e\u662f\u5426\u5408\u7406\uff0c\u770b\u770b\u5904\u7406\u6bcf\u4e2a\u8bf7\u6c42\u5360\u7528\u7684\u5185\u5b58\u6765\u8bbe\u7f6e\u4e00\u4e2a\u5408\u7406\u7684\u503c\uff1b<br \/>2. \u5229\u7528 xhprof \u53bb\u7ebf\u4e0a\u5f00\u542f\u5185\u5b58\u5206\u6790\u91c7\u6837\uff0c\u57fa\u672c\u80fd\u5b9a\u4f4d\u5230\u5185\u5b58\u5360\u7528\u9ad8\u7684\u5177\u4f53\u4f4d\u7f6e\uff0c\u7136\u540e\u4f18\u5316\u4ee3\u7801\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262014\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lbp0200 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Evilk \u4e00\u4e2a\u514d\u8d39\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u60a8\u8fd8\u60f3\u8981\u591a\u8be6\u7ec6\uff1f\u52a0\u4e2a\u8fdb\u7a0b\u6c60\uff0c\u5c31\u81ea\u884c\u8f66\u53d8\u7279\u65af\u62c9\u4e86\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262015\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : reyleon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liuxu \u8fd8\u662f\u4e0d\u80fd\u7406\u89e3 php-fpm \u8fdb\u7a0b\u5185\u5b58\u4f7f\u7528\u4f1a\u6162\u6162\u4e0a\u6da8\u7684\u539f\u56e0\u3002<\/p>\n<p>\u6700\u521d\u542f\u52a8\u65f6\u4e00\u4e2a php-fpm \u8fdb\u7a0b\u5360\u7528\u5927\u6982 20M \u5185\u5b58\uff0c\u968f\u7740\u63a5\u53d7\u8bf7\u6c42\u6570\u7684\u589e\u52a0\uff0c\u5185\u5b58\u6162\u6162\u4f1a\u5f80\u4e0a\u6da8\u5230 120M \u5de6\u53f3\uff0c\u8fd9\u4e2a\u65f6\u5019\u8fbe\u5230\u4e86\u6211\u4eec\u8bbe\u7f6e pm.max_requests \u7684\u503c\uff0c\u7136\u540e\u8fdb\u7a0b\u9500\u6bc1\uff0c\u5982\u4f55\u5468\u800c\u590d\u59cb\u3002<\/p>\n<p>\u5982\u4f60\u6240\u8bf4 \u201c\u5f15\u7528\u8ba1\u6570\u91ca\u653e\u6389\u7684\u5185\u5b58\u548c php_request_shutdown \u91ca\u653e\u6389\u7684\u5185\u5b58\u90fd\u662f\u8fd8\u7ed9 zend\uff0czend \u4e0d\u8fd8\u7ed9\u7cfb\u7edf\u201d\u3002<\/p>\n<p>\u90a3\u6211\u8fd9\u4e2a\u5185\u5b58\u4e00\u76f4\u5f80\u4e0a\u6da8\uff0c\u8bf4\u660e\u662f Zend \u4e00\u76f4\u5728\u5411 OS \u7533\u8bf7\u5185\u5b58\uff0c\u8fd9\u6ca1\u9519\u5427\u3002<br \/>\u90a3\u8fd9\u662f\u4e0d\u662f\u53ef\u4ee5\u8bf4 \u201c\u5f15\u7528\u8ba1\u6570\u201d \u548c \u201cphp_request_shutdown\u201d \u6839\u672c\u5c31\u6ca1\u6709\u91ca\u653e\u8fc7\u5185\u5b58\uff1f\u56e0\u4e3a\u5982\u679c\u91ca\u653e\u4e86\u5185\u5b58\u7ed9 Zend\uff0c\u90a3\u5c31\u8bf4\u660e Zend \u624b\u91cc\u6709\u7a7a\u95f2\u5185\u5b58\uff0c\u90a3\u5c31\u4e0d\u7528\u5411\u64cd\u4f5c\u7cfb\u7edf\u7533\u8bf7\u5566\u3002<\/p>\n<p>\u53e6\uff1a\u6211\u73b0\u5728\u6b63\u5728\u7814\u7a76\u5982\u4f55\u4f7f\u7528 xhprof \u5206\u6790\u4e1a\u52a1\u4ee3\u7801\u3002<br \/>\u6211\u4e5f\u662f\u64cd\u788e\u4e86\u5fc3\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262016\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : reyleon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wangritian \u53ef\u80fd\u5982\u4f60\u6240\u8bf4\uff0c\u56e0\u4e3a\u540c\u6837\u7684 php \u73af\u5883\uff0c\u53ea\u662f\u4e0d\u540c\u4e1a\u52a1\u7684\u53e6\u5916\u4e00\u53f0\u670d\u52a1\u5668\u5c31\u6ca1\u6709\u51fa\u73b0\u8fc7\u5185\u5b58\u4e0a\u6da8\u7684\u60c5\u51b5\uff0c\u5185\u5b58\u4f7f\u7528\u7a33\u5982\u72d7\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262017\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : reyleon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @pigfly123 \u7b2c\u4e00\u6b65\u7684\u914d\u7f6e\u5e94\u8be5\u662f\u6ca1\u95ee\u9898\u7684\u3002\u6211\u73b0\u5728\u5728\u7814\u7a76\u4f7f\u7528 xhprof \u53bb\u5206\u6790\u4ee3\u7801\uff0c\u5e0c\u671b\u80fd\u6709\u7ed3\u679c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262018\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : reyleon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @sunznx \u5e76\u4e0d\u662f\u6ca1\u6709 php \u4eba\u5458\u5440\uff0c\u4e4b\u524d\u5199\u8fd9\u5957\u4ee3\u7801\u7684\u4eba\u5df2\u7ecf\u79bb\u804c\u4e86\uff1b<br \/>\u4e0d\u8fc7\u4e0d\u662f\u6211\u8bf4\uff0c\u5c31\u7b97\u662f\u81ea\u5df1\u5199\u7684\u4ee3\u7801\uff0c\u4e5f\u4e0d\u4e00\u5b9a\u80fd\u8f7b\u6613\u627e\u51fa\u539f\u56e0\u5427\uff0c\u8fd9\u4e2a\u95ee\u9898\u5728\u4ed6\u5728\u804c\u7684\u65f6\u5019\u4e5f\u4e0d\u662f\u6ca1\u6709\u63d0\u8fc7<br \/>\u7136\u800c\u6ca1\u5375\u7528                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262019\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shanghai1998 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             php-fpm \u6211\u4eec\u63a5\u89e6\u4e0b\u6765 \u65e0\u89e3\uff01\uff01\uff01<br \/>\u5e76\u53d1\u9ad8\u4e86\uff0c\u4f1a\u5403\u5185\u5b58\u548c\u6570\u636e\u5e93\u94fe\u63a5\u4e0d\u91ca\u653e\uff0c\u5bfc\u81f4\u6574\u5957\u7cfb\u7edf\u57ae\u6389\uff0c\u89e3\u51b3\u662f\u9ad8\u5e76\u53d1 \u4e0a java                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262020\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : reyleon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Evilk \u4e00\u4e2a\u8bf7\u6c42\u5bf9\u5e94\u4e00\u4e2a PHP \u8fdb\u7a0b\uff0c\u8bf7\u6c42\u5904\u7406\u7ed3\u675f\uff0c\u8fd9\u4e2a\u8fdb\u7a0b\u624d\u80fd\u5904\u7406\u4e0b\u4e00\u4e2a\u8bf7\u6c42\u30021000 \u4e2a\u5e76\u53d1\u5982\u679c\u6ca1\u6709\u90a3\u4e48\u591a php \u8fdb\u7a0b\u5904\u7406\uff0c\u90a3\u4e48\u90a3\u4e9b\u8bf7\u6c42\u5c31\u5728\u961f\u5217\u91cc\u6392\u961f\u7b49\u5f85\u5904\u7406\u3002<\/p>\n<p>\u6211\u4e5f\u662f\u8fd9\u4e48\u7406\u89e3\u7684\u3002\u8fd9\u6709\u95ee\u9898\u5417\uff1f\u9700\u8981\u66f4\u65b0\u5bf9 PHP \u54ea\u65b9\u9762\u7684\u8ba4\u8bc6\uff1f                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262021\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuxu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @reyleon \u6ca1\u9519\uff0c\u4f60\u5f97\u770b\u770b\u4f60\u7684\u8fdb\u7a0b\u662f\u4e0d\u662f\u7ed3\u675f\u4ece\u65b0\u8d77\u4e86\u65b0\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262022\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lovecy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @reyleon \u4e00\u4e2a php-fpm \u8fdb\u7a0b\u5c31\u662f\u4e00\u4e2a cgi \u8fdb\u7a0b\u54af\uff0c\u4e5f\u5c31\u662f\u5bf9\u5e94\u4e00\u4e2a zend \u3002\u90a3\u4e9b\u7b2c\u4e09\u65b9\u5e93\u3001\u6269\u5c55\u5565\u7684\uff0c\u90fd\u662f\u81ea\u5df1\u7684\u5185\u5b58\u6c60\u5427\u3002\u5982\u679c\u8c03\u7528\u4e00\u6b21 php \u4ee3\u7801\uff0c\u8fd0\u884c\u4e00\u6b21\u6269\u5c55\uff0c\u6269\u5c55\u7533\u8bf7\u4e00\u6b21 zend \u7684\u5185\u5b58\u800c\u4e0d\u91ca\u653e\uff0c\u4ee3\u7801\u8c03\u7528\u6b21\u6570\u589e\u52a0\uff0c\u6162\u6162 zend \u5185\u5b58\u5c31\u4e0d\u591f\u7528\u4e86\u3002\u8fd9\u65f6\u5019\u9500\u6bc1 cgi \u8fdb\u7a0b\u91cd\u542f\uff0c\u5c31\u80fd\u91ca\u653e\u6389\u8fd9\u4e9b\u5185\u5b58\u3002<\/p>\n<p>\u5982\u679c\u6ca1\u6cd5\u6539\u4ee3\u7801\uff0c\u5c31\u6309 19 \u7684\u8bf4\u6cd5\u8c03\u4f18 fpm \u54af\uff0c\u53cd\u6b63\u80fd\u7528\u5c31\u884c\uff0c#21 \u8bf4\u7684&#8221;max_requests \u6211\u89c9\u5f97\u5e76\u4e0d\u662f\u59a5\u534f\uff0c\u800c\u662f\u9488\u5bf9\u5927\u91cf\u4e0d\u53ef\u63a7\u4ee3\u7801\u7684\u6700\u6709\u6548\u65b9\u6848&#8221;\uff0c\u633a\u6709\u9053\u7406\u3002<\/p>\n<p>\u53e6\u5916\u60f3\u5206\u6790\u7684\u8bdd\u53ef\u4ee5\u5217\u4e00\u4e0b php \u5b89\u88c5\u7684\u5e93\u3001\u6269\u5c55\uff0c\u8fd8\u6709\u5bf9\u5e94\u7248\u672c\uff0c\u770b\u770b\u6709\u65e0\u61c2\u54e5\u77e5\u9053\u67d0\u4e2a\u5e93\u51fa\u73b0\u8fc7\u5185\u5b58\u6cc4\u6f0f\u7684                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262023\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : reyleon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lovecy \u4ee3\u7801\u662f\u53ef\u4ee5\u6539\u7684\uff0c\u95ee\u9898\u662f\u5f97\u5148\u627e\u5230\u5185\u5b58\u4e0a\u6da8\u7684\u539f\u56e0\u624d\u6539\u7684\u52a8\u5440\u3002<\/p>\n<p>#21 \u8bf4\u7684&#8221;max_requests \u6211\u89c9\u5f97\u5e76\u4e0d\u662f\u59a5\u534f\uff0c\u800c\u662f\u9488\u5bf9\u5927\u91cf\u4e0d\u53ef\u63a7\u4ee3\u7801\u7684\u6700\u6709\u6548\u65b9\u6848&#8221;\uff0c\u633a\u6709\u9053\u7406\u3002\u5f53\u524d\u6211\u4e5f\u662f\u8fd9\u4e48\u505a\u7684\uff0c\u4f46\u662f\u611f\u89c9\u4e0d\u723d\u3002\u53cd\u6b63\u80fd\u7528\u5c31\u884c\uff0c\u8fd9\u8981\u6c42\u4e5f\u5fd2\u4f4e\u4e86\u70b9\u5427\uff1f<\/p>\n<p># php -m<br \/>[PHP Modules]<br \/>bcmath<br \/>Core<br \/>ctype<br \/>curl<br \/>date<br \/>dom<br \/>ereg<br \/>fileinfo<br \/>filter<br \/>gd<br \/>hash<br \/>iconv<br \/>json<br \/>libxml<br \/>mbstring<br \/>mcrypt<br \/>mongo<br \/>mongodb<br \/>mysql<br \/>mysqli<br \/>mysqlnd<br \/>openssl<br \/>pcntl<br \/>pcre<br \/>PDO<br \/>pdo_mysql<br \/>pdo_sqlite<br \/>Phar<br \/>posix<br \/>redis<br \/>Reflection<br \/>session<br \/>SimpleXML<br \/>sockets<br \/>SPL<br \/>sqlite3<br \/>standard<br \/>tokenizer<br \/>xml<br \/>xmlreader<br \/>xmlwriter<br \/>zip<br \/>zlib<\/p>\n<p>\u7248\u672c\u5c31\u4e0d\u77e5\u9053\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262024\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : keepeye <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u80fd\u662f\u4ee3\u7801\u3001\u7b2c\u4e09\u65b9\u6a21\u5757\u5bfc\u81f4\u5185\u5b58\u6cc4\u6f0f\uff0c\u4f60\u4e5f\u65e0\u6cd5\u63a7\u5236\u4ee3\u7801\u8d28\u91cf\uff0c\u53ea\u80fd\u901a\u8fc7\u4e00\u4e9b\u63aa\u65bd\u51cf\u5c11\u5f71\u54cd\u5427<br \/>\u6bd4\u5982\uff1a<br \/>php.ini \u8bbe\u7f6e max_memory \u5c0f\u4e00\u4e9b<br \/>pm.max_requests \u8bbe\u5c0f\u4e00\u4e9b<br \/>\u591c\u6df1\u4eba\u9759\u7684\u65f6\u5019\u91cd\u542f\u4e00\u4e0b php-fpm                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262025\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wangritian <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @reyleon \u786e\u5b9e\u662f\u91ce\u8def\u5b50\uff0c\u4f46\u5b8c\u7f8e\u89e3\u51b3\u65b9\u6848\u6210\u672c\u4e0d\u53ef\u63a7\u554a\uff0c\u800c\u4e14\u8fd9\u4e2a\u91ce\u8def\u5b50\u4e5f\u6ca1\u4ec0\u4e48\u526f\u4f5c\u7528\u3002\u4e3e\u4e2a\u6781\u7aef\u4f8b\u5b50\uff0c\u5047\u5982 bug \u6269\u5c55\u7684\u6240\u6709\u7248\u672c\u90fd\u6709\u6cc4\u9732\uff0c\u800c\u4f60\u53c8\u4e0d\u5f97\u4e0d\u4f9d\u8d56\u5b83\uff0c\u600e\u4e48\u529e\uff1f\u54ea\u6015\u73b0\u5728\u89e3\u51b3\u4e86 bug\uff0c\u4e3a\u4e86\u9632\u6b62\u540e\u9762\u66f4\u65b0\u518d\u6b21\u6cc4\u9732\uff0c\u4e5f\u63a8\u8350\u8bbe\u7f6e max_requests                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262026\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuyibao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5047\u5982\u662f\u504f\u4e1a\u52a1\u7684\u63a5\u53e3\uff0c\u5927\u90e8\u5206\u662f\u4e1a\u52a1\u4ee3\u7801\u5199\u7684\u4e0d\u597d\uff0c\u6bd4\u5982\u6570\u636e\u6162\u67e5\u8be2\u7b49\u7b49\u3002\u5bfc\u81f4\u8fdb\u7a0b\u7b49\u5f85\uff0c\u77ac\u65f6\u8fdb\u7a0b\u6570\u8fc7\u5927\u3002\u6240\u4ee5\u68c0\u67e5\u4e0b\u4f60\u7684\u63a5\u53e3\u54cd\u5e94\u65f6\u95f4\u662f\u591a\u5c11\uff0c\u592a\u6162\u7684\u8bdd\u80af\u5b9a\u662f\u4e1a\u52a1\u4ee3\u7801\u7684\u95ee\u9898\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262027\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yc8332 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bf7\u6c42\u91cf\u5927\u4e86\u5360\u7528\u5185\u5b58\u4e0d\u662f\u5f88\u6b63\u5e38\u7684\u5417\uff1f\u914d\u7f6e\u597d\u76f8\u5e94\u7684\u6700\u5927\u8fdb\u7a0b\u6570\u5c31\u597d\u4e86\u3002\u3002\u5982\u679c\u662f\u968f\u7740\u65f6\u95f4\u63a8\u79fb\u5185\u5b58\u5360\u7528\u591a\uff0c\u90a3\u5c31\u662f\u4f60\u7684 php \u4ee3\u7801\u5185\u5b58\u6cc4\u9732\uff0c\u6b63\u5e38\u662f\u4e0d\u4f1a\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262028\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Evilk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @reyleon \u600e\u4e48\u6211\u4e4b\u524d\u770b\u5230\u7684\u4f60\u7684\u56de\u7b54,\u4e0d\u4e00\u6837,\u5947\u602a<br \/>\u6211\u9488\u5bf9\u7684\u662f\u4f60\u4e4b\u524d\u8bf4\u7684&#8221;\u8bf7\u6c42\u7ed3\u675f\uff0c\u8fdb\u7a0b\u5173\u95ed&#8221;<br \/>\u8001\u7684 cgi \u6a21\u5f0f,\u8bf7\u6c42\u7ed3\u675f\u540e,\u8fdb\u7a0b\u4f1a\u5173\u95ed<br \/>php-fpm \u6a21\u5f0f\u4e0b,\u8bf7\u6c42\u7ed3\u675f,\u5f53\u524d\u8fdb\u7a0b\u5e76\u4e0d\u4f1a\u9000\u51fa<br \/>\u4ec5\u6b64\u800c\u5df2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262029\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : joyqi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             php \u7684\u6027\u80fd\u6ca1\u6709\u5f88\u591a\u4eba\u60f3\u8c61\u5f97\u90a3\u4e48\u70c2\uff0c\u8fd9\u4e2a\u5e16\u5b50\u91cc\u5f88\u591a\u4eba\u7684\u670d\u52a1\u5668\u8d44\u6e90\u79f0\u5f97\u4e0a\u5962\u4f88\u4e86\u3002\u4e3b\u63d0\u4f9b\u7684\u4fe1\u606f\u6709\u9650\uff0c\u4f60\u7684\u670d\u52a1\u5668\u5e76\u53d1\u91cf\u73b0\u5728\u662f\u591a\u5c11\uff0c\u5e73\u5747\u54cd\u5e94\u65f6\u95f4\u662f\u591a\u5c11\uff0c\u662f\u5426\u5b58\u5728\u6162\u67e5\u8be2\uff0c\u670d\u52a1\u5668\u7684\u5185\u5b58\u5360\u7528\u76d1\u63a7\u56fe\u662f\u5426\u53ef\u4ee5\u63d0\u4f9b\u4e0b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262030\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JasperYanky <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u52a0\u673a\u5668\uff01<\/p>\n<p>\u4e1a\u52a1\u8dd1\u7684\u597d\uff1a\u8fd9\u4e48\u8d5a\u94b1\u7684\u4e1a\u52a1\uff0c\u52a0\u70b9\u673a\u5668\u600e\u4e48\u4e86\uff1f<br \/>\u4e1a\u52a1\u8dd1\u7684\u4e0d\u597d\uff1a\u4e1a\u52a1\u8fd9\u4e48\u5dee\u8fd8\u8ba9\u4eba\u6295\u5165\u7cbe\u529b\u6539\u4ee3\u7801\u6539\u914d\u7f6e\uff1f\u52a0\u673a\u5668\u5c31\u5b8c\u4e8b\u4e86\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262031\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ladypxy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u9700\u8981\u7684\u6a21\u5757\u4e0d\u8981\u52a0\u8f7d<br \/>\u6362 php 7.3<br \/>php \u6548\u7387\u5176\u5b9e\u5f88\u9ad8\uff0c\u4e00\u822c\u90fd\u662f\u4f60\u8bbe\u7f6e\u95ee\u9898                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262032\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : reyleon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Evilk \u4f60\u53ef\u80fd\u770b\u9519\u4e86\u3002\u201c\u8bf7\u6c42\u7ed3\u675f\uff0c\u8fdb\u7a0b\u5173\u95ed\u201d \u8fd9\u662f 3 \u8bf4\u7684\uff0c\u4e0d\u662f\u6211\u8bf4\u7684\uff0c\u4f60\u641e\u9519\u5bf9\u8c61\u4e86\u3002\u54c8\u54c8\u54c8                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262033\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : reyleon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @joyqi \u5e76\u53d1\u91cf\u5176\u5b9e\u5f88\u4f4e\uff0c\u76ee\u524d\u65e5 PV 90 \u4e07\u4e0d\u5230\uff0c\u6211\u4e4b\u524d\u81ea\u5df1\u505a\u8fc7\u538b\u6d4b\uff0c\u6211\u4eec\u8fd9\u4e2a\u63a5\u53e3\u670d\u52a1\u5668\u6027\u80fd\u5176\u5b9e\u5f88\u5dee\uff0c\u4f30\u8ba1\u5e76\u53d1\u6491\u4e0d\u8fc7 40\uff0c\u4f46\u6027\u80fd\u95ee\u9898\u76ee\u524d\u5e76\u4e0d\u662f\u6211\u6025\u9700\u89e3\u51b3\u7684\u3002<\/p>\n<p>\u4e3b\u8981\u662f php-fpm \u8fdb\u7a0b\u5403\u5185\u5b58\uff0c\u4f1a\u6162\u6162\u5f80\u4e0a\u6da8\uff0c\u8fd9\u624d\u662f\u6211\u60f3\u5feb\u70b9\u89e3\u51b3\u7684\u3002<br \/>\u5982\u679c\u4e0d\u8bbe\u7f6e pm.max_requests\uff0c \u5b83\u53ef\u4ee5\u5403\u5b8c\u673a\u5668\u6240\u6709\u7684\u5185\u5b58\u3002<\/p>\n<p>\u53e6\uff1aV2EX \u8c8c\u4f3c\u65e0\u6cd5\u4e0a\u56fe\uff1f                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262034\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhenhuaYang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liuxu 666666 \u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262035\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : MeteorCat <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ulimit \u591a\u5c11                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262036\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : seth19960929 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c php-fpm \u6709\u5185\u5b58\u6cc4\u6f0f\uff0c\u4e0d\u592a\u53ef\u80fd\u6709\u8fd9\u4e48\u4f4e\u7ea7\u7684\u9519\u8bef<br \/>\u6211\u4ece\u4f18\u5148\u7ea7\u7ed9\u4f60\u6392\u67e5<br \/>\u4f60\u7684\u4ee3\u7801\u6709\u8c03\u7528\u7cfb\u7edf\u547d\u4ee4\u5417\uff1f\u6216\u8005\u5b88\u62a4\u8fdb\u57ce\u670d\u52a1\uff0c\u6bd4\u5982 kafka<\/p>\n<p>\u662f\u5426\u6709\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u5e38\u9a7b\u5185\u5b58\u7684 PHP \u811a\u672c\u4efb\u52a1<\/p>\n<p>\u4f60\u5728\u5185\u5b58\u5360\u7528\u9ad8\u7684\u65f6\u5019 top \u4e00\u4e0b\u770b\u6709\u51e0\u4e2a work \u8fdb\u7a0b                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262037\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuxu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zhenhuaYang \u53c8\u88ab\u4f60\u53d1\u73b0\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262038\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : CODEWEA <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53c8\u6765\u9ed1 php\uff0c\u4f60\u7684 pv \u624d 90 \u4e07\uff0c\u5c31\u7b97\u662f\u8bbe\u7f6e\u6210 static=30 \u90fd\u6ca1\u95ee\u9898\uff0c\u8981\u60f3\u627e\u5230\u89e3\u51b3\u529e\u6cd5\uff0c\u8fd8\u5f97\u5206\u6790\u5177\u4f53\u4e1a\u52a1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262039\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ben1024 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @shanghai1998 <br \/>\u4e0d\u592a\u8d5e\u540c\u6362\u8bed\u8a00\u5c31\u80fd\u5f7b\u5e95\u89e3\u51b3\u5e76\u53d1\u95ee\u9898\uff0c\u5176\u4ed6\u8bed\u8a00\u4f18\u52bf\u662f\u6709\uff0c\u4f46\u662f\u5f00\u53d1\u8005\u672c\u8eab\u6c34\u5e73\u624d\u662f\u5173\u952e                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262040\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : everyx <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ben1024 \u4e4b\u524d\u7528 https:\/\/github.com\/DarkGhostHunter\/Preloader \u8fd9\u4e2a\u7ed9\u9879\u76ee\u4e0a\u4e86 preloading\uff0c\u4f60\u53ef\u4ee5\u8bd5\u8bd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262041\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : anerevol <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u80fd\u662f\u4e0b\u9762\u8bf4\u7684\u8fd9\u4e2a\u95ee\u9898\u4e48<br \/>\u4f60\u8fd9\u4e2a\u57fa\u672c\u5c5e\u4e8e\u80fd\u5fc5\u73b0\u7684\u95ee\u9898 \u7406\u8bba\u4e0a\u7528\u4e8c\u5206\u6cd5\u5f88\u5feb\u80fd\u5b9a\u4f4d\u95ee\u9898\u7684<br \/>https:\/\/bugs.php.net\/bug.php?id=76436<\/p>\n<p> [2019-08-14 21:50 UTC] phpbug at ethaniel dot com<br \/>I have this problem in PHP 5.6.40 on Centos 7.6.<\/p>\n<p>This simple code triggers it. I just read around 1 million rows from the table and my memory usage is just growing higher and higher.<\/p>\n<p>$cnt = 0;<br \/>$result = mysqli_query($conn,&#8221;SELECT `text`,`sms_date`,`to` FROM `sms_data`.`sms_201933`;&#8221;); <br \/>while ($row = mysqli_fetch_object($result)) {<\/p>\n<p> if ($cnt%1000) {<br \/> echo memory_get_usage().&#8221; *** nn&#8221;;<br \/> }<\/p>\n<p> $cnt++;<\/p>\n<p>}                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262042\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : huangsen365 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 remi php 7.x<br \/>\u7528 docker \u6784\u5efa\u955c\u50cf<br \/>\u4e0a\u591a\u8282\u70b9\u4e0a\u8d1f\u8f7d\u5747\u8861<br \/>\u6570\u636e\u5e93\u4f7f\u7528\u8bfb\u5199\u5206\u79bb                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262043\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : IDAEngine <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ca1\u9047\u5230\u8fc7\uff0c\u5185\u5b58\u4e0a\u6da8\u4e0d\u91ca\u653e\u5f88\u5927\u539f\u56e0\u662f\u4ee3\u7801\u5199\u7684\u6709\u95ee\u9898                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262044\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : reyleon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @anerevol \u611f\u8c22\uff01\u4e0d\u8fc7\u6211\u770b\u4e86\u4e0b\uff0c\u5e94\u8be5\u4e0d\u662f\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u641c\u7d22\u4e86\u4e00\u4e0b\uff0c\u4ee3\u7801\u4e2d\u5e76\u6ca1\u6709\u6d89\u53ca mysqli \u7684\u4ee3\u7801\uff0c\u4e8b\u5b9e\u4e0a\u90fd\u6ca1\u6709\u8fde\u63a5 MySQL \u670d\u52a1\u3002\u6709\u8fde\u63a5\u7684\u53ea\u6709 redis                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262045\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : oneend <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @reyleon <br \/>\u8bd5\u8bd5\u52a0\u4e0a opcache                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262046\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rqrq <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5c31\u662f\u4ee3\u7801\u95ee\u9898\uff0c\u81ea\u5df1\u4e00\u70b9\u70b9\u7684\u53bb\u6389\u4ee3\u7801\u67e5\u5427\u3002<br \/>\u4e4b\u524d\u7528 swoole \u5f04\u4e86\u4e2a http server\uff0c\u6309\u7167\u6587\u6863 \u201c\u6355\u83b7 Server \u8fd0\u884c\u671f\u81f4\u547d\u9519\u8bef\u201d \u52a0\u4e86 register_shutdown_function \u653e\u5230 onRequest \u91cc\u9762\uff0c\u7ed3\u679c\u5c31\u662f\u5185\u5b58\u6cc4\u6f0f\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262047\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : onion83 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5b89\u5229\u4e00\u4e0b Swoole tracker https:\/\/business.swoole.com\/tracker\/index                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262048\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : litujin1123 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @reyleon \u90a3\u4e0d\u662f\u4e5f\u5e94\u8be5\u6392\u67e5\u4e00\u4e0b redis \u90e8\u5206\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4262049\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Varobjs <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u80fd 99%\u662f\u4e1a\u52a1\u4ee3\u7801\u5199\u7684\u95ee\u9898<\/p>\n<p>\u91cd\u6784\u5427                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>PHP -fpm \u670d\u52a1\u5668\u5185\u5b58\u5360\u7528\u9661&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/199714"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=199714"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/199714\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=199714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=199714"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=199714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}