{"id":118951,"date":"2026-10-28T14:16:29","date_gmt":"2026-10-28T06:16:29","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/118951.html"},"modified":"2026-10-28T14:16:29","modified_gmt":"2026-10-28T06:16:29","slug":"php-%e7%94%9f%e5%91%bd%e5%91%a8%e6%9c%9f%e4%b8%8e-php-fpm-%e5%b7%a5%e4%bd%9c%e6%a8%a1%e5%bc%8f%ef%bc%9a%e4%bb%8e-nginx-%e5%88%b0-php-%e6%89%a7%e8%a1%8c%e5%ae%8c%e6%af%95%e7%9a%84%e5%85%a8%e9%93%be","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/118951.html","title":{"rendered":"PHP \u751f\u547d\u5468\u671f\u4e0e PHP-FPM \u5de5\u4f5c\u6a21\u5f0f\uff1a\u4ece Nginx \u5230 PHP \u6267\u884c\u5b8c\u6bd5\u7684\u5168\u94fe\u8def\u5256\u6790"},"content":{"rendered":"<h3>\u76ee\u5f55<\/h3>\n<ul>\n<li>1. \u5f15\u8a00&#xff1a;\u4e3a\u4ec0\u4e48\u9700\u8981\u7406\u89e3 PHP \u7684\u751f\u547d\u5468\u671f<\/li>\n<li>2. \u5148\u5efa\u7acb\u6574\u4f53\u8ba4\u77e5&#xff1a;\u4e09\u4e2a\u89d2\u8272<\/li>\n<li>3. \u4e00\u6b21\u8bf7\u6c42\u7684\u5b8c\u6574\u751f\u547d\u5468\u671f\n<ul>\n<li>3.1 \u9636\u6bb5\u4e00&#xff1a;Nginx \u63a5\u6536\u8bf7\u6c42<\/li>\n<li>3.2 \u9636\u6bb5\u4e8c&#xff1a;FastCGI \u534f\u8bae\u5c01\u88c5<\/li>\n<li>3.3 \u9636\u6bb5\u4e09&#xff1a;PHP-FPM \u8c03\u5ea6\u5230 Worker<\/li>\n<li>3.4 \u9636\u6bb5\u56db&#xff1a;\u54cd\u5e94\u56de\u4f20<\/li>\n<\/ul>\n<\/li>\n<li>4. PHP-FPM \u7684\u8fdb\u7a0b\u6a21\u578b\n<ul>\n<li>4.1 Master \/ Worker \u53cc\u5c42\u7ed3\u6784<\/li>\n<li>4.2 \u4e09\u79cd\u8fdb\u7a0b\u7ba1\u7406\u7b56\u7565<\/li>\n<li>4.3 \u4e3a\u4ec0\u4e48 PHP \u4e0d\u9700\u8981\u8fde\u63a5\u6c60<\/li>\n<\/ul>\n<\/li>\n<li>5. \u4e0e Java \u5e38\u9a7b\u6a21\u578b\u7684\u672c\u8d28\u5dee\u5f02<\/li>\n<li>6. \u5168\u94fe\u8def\u65f6\u5e8f\u56fe<\/li>\n<li>7. \u5b9e\u8df5\u5efa\u8bae<\/li>\n<li>8. \u5c0f\u7ed3<\/li>\n<\/ul>\n<h3>1. \u5f15\u8a00&#xff1a;\u4e3a\u4ec0\u4e48\u9700\u8981\u7406\u89e3 PHP \u7684\u751f\u547d\u5468\u671f<\/h3>\n<p>\u5f88\u591a\u540c\u5b66\u5199 PHP \u65f6&#xff0c;\u4e60\u60ef\u628a PHP \u5f53\u6210&#034;\u811a\u672c\u8bed\u8a00&#034;\u6765\u7406\u89e3&#xff1a;\u5199\u5b8c\u4e00\u4e2a index.php&#xff0c;\u4e22\u5230\u670d\u52a1\u5668\u4e0a&#xff0c;\u6d4f\u89c8\u5668\u4e00\u8bbf\u95ee\u5c31\u51fa\u7ed3\u679c\u3002\u4f46\u4e00\u65e6\u9047\u5230\u7ebf\u4e0a\u95ee\u9898\u2014\u2014\u6bd4\u5982&#034;\u4e3a\u4ec0\u4e48 PHP \u6ca1\u6709\u50cf Java \u90a3\u6837\u7684\u8fde\u63a5\u6c60&#034;\u3001\u201c\u4e3a\u4ec0\u4e48 static \u53d8\u91cf\u5728\u4e24\u6b21\u8bf7\u6c42\u4e4b\u95f4\u4e0d\u5171\u4eab\u201d\u3001\u201c\u4e3a\u4ec0\u4e48 PHP-FPM \u8fdb\u7a0b\u6570\u8c03\u5927\u53cd\u800c\u66f4\u6162\u201d\u2014\u2014\u5c31\u4f1a\u53d1\u73b0&#xff0c;\u4e0d\u7406\u89e3\u751f\u547d\u5468\u671f\u548c\u8fdb\u7a0b\u6a21\u578b&#xff0c;\u5f88\u591a\u73b0\u8c61\u6839\u672c\u89e3\u91ca\u4e0d\u901a\u3002<\/p>\n<p>\u672c\u6587\u4ece\u4e00\u6b21 HTTP \u8bf7\u6c42\u51fa\u53d1&#xff0c;\u628a\u300cNginx \u2192 FastCGI \u2192 PHP-FPM \u2192 PHP \u811a\u672c\u6267\u884c \u2192 \u54cd\u5e94\u8fd4\u56de\u300d\u8fd9\u6761\u94fe\u8def\u5b8c\u6574\u62c6\u5f00&#xff0c;\u5e76\u91cd\u70b9\u5bf9\u6bd4 PHP-FPM \u7684\u5e38\u9a7b\u8fdb\u7a0b\u6a21\u578b \u4e0e Java \u5e38\u9a7b\u5e94\u7528\u6a21\u578b \u7684\u672c\u8d28\u5dee\u5f02&#xff0c;\u6700\u540e\u7ed9\u51fa\u4e00\u5f20\u5168\u94fe\u8def\u65f6\u5e8f\u56fe&#xff0c;\u65b9\u4fbf\u4f60\u5efa\u7acb\u6574\u4f53\u8ba4\u77e5\u3002<\/p>\n<h3>2. \u5148\u5efa\u7acb\u6574\u4f53\u8ba4\u77e5&#xff1a;\u4e09\u4e2a\u89d2\u8272<\/h3>\n<p>\u5728\u5178\u578b\u7684 LNMP \u67b6\u6784\u4e2d&#xff0c;\u4e00\u6b21 PHP \u8bf7\u6c42\u4f1a\u7ecf\u8fc7\u4e09\u4e2a\u6838\u5fc3\u89d2\u8272&#xff1a;<\/p>\n<table>\n<tr>\u89d2\u8272\u804c\u8d23\u662f\u5426\u5e38\u9a7b<\/tr>\n<tbody>\n<tr>\n<td>Nginx<\/td>\n<td>\u63a5\u6536 HTTP \u8bf7\u6c42\u3001\u9759\u6001\u8d44\u6e90\u76f4\u63a5\u8fd4\u56de\u3001\u52a8\u6001\u8bf7\u6c42\u8f6c\u53d1\u7ed9 PHP-FPM<\/td>\n<td>\u5e38\u9a7b&#xff08;Master &#043; Worker&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>PHP-FPM<\/td>\n<td>\u7ba1\u7406\u4e00\u7ec4 PHP \u8fdb\u7a0b&#xff0c;\u63a5\u6536 FastCGI \u534f\u8bae\u8bf7\u6c42\u5e76\u8c03\u5ea6\u7ed9 Worker<\/td>\n<td>\u5e38\u9a7b&#xff08;Master &#043; Pool Worker&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>PHP \u89e3\u91ca\u5668<\/td>\n<td>\u5728 Worker \u8fdb\u7a0b\u5185\u89e3\u6790\u5e76\u6267\u884c PHP \u811a\u672c<\/td>\n<td>\u968f Worker \u5e38\u9a7b&#xff0c;\u4f46\u6bcf\u6b21\u8bf7\u6c42\u91cd\u65b0\u521d\u59cb\u5316\u811a\u672c\u4e0a\u4e0b\u6587<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5173\u952e\u70b9\u5728\u4e8e&#xff1a;PHP-FPM \u7684\u8fdb\u7a0b\u662f\u5e38\u9a7b\u7684&#xff0c;\u4f46 PHP \u7684&#034;\u5e94\u7528\u72b6\u6001&#034;\u4e0d\u662f\u5e38\u9a7b\u7684\u3002\u8fd9\u662f\u7406\u89e3\u540e\u9762\u6240\u6709\u5dee\u5f02\u7684\u94a5\u5319\u3002<\/p>\n<p>\u4e0b\u9762\u7528\u4e00\u5f20\u56fe\u628a\u4e09\u4e2a\u89d2\u8272\u7684\u5173\u7cfb\u4e0e\u6570\u636e\u6d41\u5411\u4e32\u8d77\u6765&#xff1a;<\/p>\n<p>  #mermaid-svg-HGdyoq5cuEL98zWl{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-HGdyoq5cuEL98zWl .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-HGdyoq5cuEL98zWl .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-HGdyoq5cuEL98zWl .error-icon{fill:#552222;}#mermaid-svg-HGdyoq5cuEL98zWl .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-HGdyoq5cuEL98zWl .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-HGdyoq5cuEL98zWl .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-HGdyoq5cuEL98zWl .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-HGdyoq5cuEL98zWl .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-HGdyoq5cuEL98zWl .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-HGdyoq5cuEL98zWl .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-HGdyoq5cuEL98zWl .marker{fill:#333333;stroke:#333333;}#mermaid-svg-HGdyoq5cuEL98zWl .marker.cross{stroke:#333333;}#mermaid-svg-HGdyoq5cuEL98zWl svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-HGdyoq5cuEL98zWl p{margin:0;}#mermaid-svg-HGdyoq5cuEL98zWl .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-HGdyoq5cuEL98zWl .cluster-label text{fill:#333;}#mermaid-svg-HGdyoq5cuEL98zWl .cluster-label span{color:#333;}#mermaid-svg-HGdyoq5cuEL98zWl .cluster-label span p{background-color:transparent;}#mermaid-svg-HGdyoq5cuEL98zWl .label text,#mermaid-svg-HGdyoq5cuEL98zWl span{fill:#333;color:#333;}#mermaid-svg-HGdyoq5cuEL98zWl .node rect,#mermaid-svg-HGdyoq5cuEL98zWl .node circle,#mermaid-svg-HGdyoq5cuEL98zWl .node ellipse,#mermaid-svg-HGdyoq5cuEL98zWl .node polygon,#mermaid-svg-HGdyoq5cuEL98zWl .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-HGdyoq5cuEL98zWl .rough-node .label text,#mermaid-svg-HGdyoq5cuEL98zWl .node .label text,#mermaid-svg-HGdyoq5cuEL98zWl .image-shape .label,#mermaid-svg-HGdyoq5cuEL98zWl .icon-shape .label{text-anchor:middle;}#mermaid-svg-HGdyoq5cuEL98zWl .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-HGdyoq5cuEL98zWl .rough-node .label,#mermaid-svg-HGdyoq5cuEL98zWl .node .label,#mermaid-svg-HGdyoq5cuEL98zWl .image-shape .label,#mermaid-svg-HGdyoq5cuEL98zWl .icon-shape .label{text-align:center;}#mermaid-svg-HGdyoq5cuEL98zWl .node.clickable{cursor:pointer;}#mermaid-svg-HGdyoq5cuEL98zWl .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-HGdyoq5cuEL98zWl .arrowheadPath{fill:#333333;}#mermaid-svg-HGdyoq5cuEL98zWl .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-HGdyoq5cuEL98zWl .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-HGdyoq5cuEL98zWl .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-HGdyoq5cuEL98zWl .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-HGdyoq5cuEL98zWl .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-HGdyoq5cuEL98zWl .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-HGdyoq5cuEL98zWl .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-HGdyoq5cuEL98zWl .cluster text{fill:#333;}#mermaid-svg-HGdyoq5cuEL98zWl .cluster span{color:#333;}#mermaid-svg-HGdyoq5cuEL98zWl div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-HGdyoq5cuEL98zWl .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-HGdyoq5cuEL98zWl rect.text{fill:none;stroke-width:0;}#mermaid-svg-HGdyoq5cuEL98zWl .icon-shape,#mermaid-svg-HGdyoq5cuEL98zWl .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-HGdyoq5cuEL98zWl .icon-shape p,#mermaid-svg-HGdyoq5cuEL98zWl .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-HGdyoq5cuEL98zWl .icon-shape .label rect,#mermaid-svg-HGdyoq5cuEL98zWl .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-HGdyoq5cuEL98zWl .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-HGdyoq5cuEL98zWl .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-HGdyoq5cuEL98zWl :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>HTTP \u8bf7\u6c42<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u9759\u6001\u8d44\u6e90\u76f4\u63a5\u8fd4\u56de<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>FastCGI \u534f\u8bae<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>FCGI_STDOUT<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u54cd\u5e94<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>HTTP \u54cd\u5e94<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6d4f\u89c8\u5668<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Nginx&#xff08;Master &#043; Worker&#xff09;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>PHP-FPM&#xff08;Master &#043; Worker \u6c60&#xff09;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>PHP \u89e3\u91ca\u5668 \/ OPcache<\/p>\n<p><\/span><\/p>\n<h3>3. \u4e00\u6b21\u8bf7\u6c42\u7684\u5b8c\u6574\u751f\u547d\u5468\u671f<\/h3>\n<h4>3.1 \u9636\u6bb5\u4e00&#xff1a;Nginx \u63a5\u6536\u8bf7\u6c42<\/h4>\n<p>\u6d4f\u89c8\u5668\u53d1\u8d77 GET \/index.php?id&#061;1&#xff0c;Nginx \u7684 Master \u8fdb\u7a0b\u65e9\u5df2\u76d1\u542c 80\/443 \u7aef\u53e3&#xff0c;\u8fde\u63a5\u5efa\u7acb\u540e\u7531\u67d0\u4e2a Worker \u8fdb\u7a0b\u63a5\u7ba1\u3002Nginx Worker \u6839\u636e location \u914d\u7f6e\u5224\u65ad&#xff1a;<\/p>\n<ul>\n<li>\u9759\u6001\u6587\u4ef6&#xff08;.css\u3001.js\u3001\u56fe\u7247&#xff09;\u2192 \u76f4\u63a5\u8bfb\u78c1\u76d8\u8fd4\u56de&#xff1b;<\/li>\n<li>.php \u7ed3\u5c3e \u2192 \u4ea4\u7ed9 fastcgi_pass \u6307\u5b9a\u7684\u4e0a\u6e38&#xff0c;\u4e5f\u5c31\u662f PHP-FPM \u76d1\u542c\u7684\u5730\u5740&#xff08;Unix Socket \u6216 127.0.0.1:9000&#xff09;\u3002<\/li>\n<\/ul>\n<p>location ~ \\\\.php$ {<br \/>\n    fastcgi_pass unix:\/run\/php\/php8.2-fpm.sock;<br \/>\n    fastcgi_index index.php;<br \/>\n    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br \/>\n    include fastcgi_params;<br \/>\n}<\/p>\n<h4>3.2 \u9636\u6bb5\u4e8c&#xff1a;FastCGI \u534f\u8bae\u5c01\u88c5<\/h4>\n<p>Nginx \u4e0d\u4f1a\u76f4\u63a5&#034;\u8c03\u7528&#034; PHP&#xff0c;\u800c\u662f\u628a HTTP \u8bf7\u6c42\u7ffb\u8bd1\u6210 FastCGI \u534f\u8bae\u7684\u4e8c\u8fdb\u5236\u62a5\u6587\u3002FastCGI \u662f\u4e00\u79cd\u4e8c\u8fdb\u5236\u534f\u8bae&#xff0c;\u62a5\u6587\u7531\u300cHeader &#043; Body\u300d\u7ec4\u6210&#xff0c;\u5e38\u89c1\u7c7b\u578b\u6709&#xff1a;<\/p>\n<ul>\n<li>FCGI_BEGIN_REQUEST&#xff1a;\u5f00\u59cb\u4e00\u6b21\u8bf7\u6c42&#xff1b;<\/li>\n<li>FCGI_PARAMS&#xff1a;\u4f20\u9012 QUERY_STRING\u3001REQUEST_METHOD\u3001SCRIPT_FILENAME \u7b49\u53c2\u6570&#xff1b;<\/li>\n<li>FCGI_STDIN&#xff1a;\u8bf7\u6c42\u4f53&#xff08;POST \u6570\u636e&#xff09;&#xff1b;<\/li>\n<li>FCGI_STDOUT \/ FCGI_STDERR&#xff1a;PHP \u7684\u8f93\u51fa\u4e0e\u9519\u8bef\u3002<\/li>\n<\/ul>\n<p>\u76f8\u6bd4 CGI \u6bcf\u6b21\u8bf7\u6c42 fork \u4e00\u4e2a\u65b0\u8fdb\u7a0b&#xff0c;FastCGI \u7684\u6838\u5fc3\u4f18\u52bf\u5c31\u662f\u8fdb\u7a0b\u590d\u7528&#xff1a;\u4e00\u4e2a\u8fdb\u7a0b\u53ef\u4ee5\u8fde\u7eed\u5904\u7406\u591a\u4e2a\u8bf7\u6c42&#xff0c;\u7701\u53bb\u53cd\u590d fork \u548c\u52a0\u8f7d\u89e3\u91ca\u5668\u7684\u5f00\u9500\u3002<\/p>\n<h4>3.3 \u9636\u6bb5\u4e09&#xff1a;PHP-FPM \u8c03\u5ea6\u5230 Worker<\/h4>\n<p>PHP-FPM \u7684 Master \u8fdb\u7a0b\u6536\u5230\u8fde\u63a5\u540e&#xff0c;\u4ece\u8fdb\u7a0b\u6c60\u4e2d\u6311\u4e00\u4e2a\u7a7a\u95f2 Worker&#xff0c;\u628a\u8bf7\u6c42\u4ea4\u7ed9\u5b83\u3002Worker \u8fdb\u7a0b\u5185\u90e8\u5927\u81f4\u505a\u8fd9\u4e9b\u4e8b&#xff1a;<\/p>\n<li>\u8bfb\u53d6\u5e76\u89e3\u6790 FastCGI \u62a5\u6587&#xff0c;\u8fd8\u539f\u51fa $_GET\u3001$_POST\u3001$_SERVER \u7b49\u8d85\u5168\u5c40\u53d8\u91cf&#xff1b;<\/li>\n<li>\u521d\u59cb\u5316\u8bf7\u6c42\u4e0a\u4e0b\u6587&#xff1a;\u91cd\u7f6e\u7b26\u53f7\u8868\u3001\u6e05\u7a7a\u4e0a\u4e00\u6b21\u8bf7\u6c42\u6b8b\u7559\u7684\u5168\u5c40\u53d8\u91cf\u3001\u8bbe\u7f6e max_execution_time \u8ba1\u65f6\u5668&#xff1b;<\/li>\n<li>\u7f16\u8bd1\u5e76\u6267\u884c\u811a\u672c&#xff1a;\u5982\u679c\u5f00\u542f\u4e86 OPcache&#xff0c;\u4f1a\u5148\u67e5\u7f13\u5b58&#xff0c;\u547d\u4e2d\u5219\u8df3\u8fc7\u8bcd\u6cd5\/\u8bed\u6cd5\u5206\u6790&#xff0c;\u76f4\u63a5\u6267\u884c opcode&#xff1b;<\/li>\n<li>\u8f93\u51fa\u7f13\u51b2&#xff1a;echo \u7684\u5185\u5bb9\u5148\u8fdb\u5165\u8f93\u51fa\u7f13\u51b2\u533a&#xff0c;\u6309 output_buffering \u914d\u7f6e\u51b3\u5b9a\u4f55\u65f6\u5237\u51fa&#xff1b;<\/li>\n<li>\u8bf7\u6c42\u6536\u5c3e&#xff1a;\u6267\u884c register_shutdown_function \u6ce8\u518c\u7684\u56de\u8c03\u3001\u8c03\u7528\u6790\u6784\u51fd\u6570\u3001\u5173\u95ed\u6570\u636e\u5e93\u8fde\u63a5\u3001\u91ca\u653e\u5185\u5b58&#xff08;memory_limit \u68c0\u67e5\u8d2f\u7a7f\u5168\u7a0b&#xff09;\u3002<\/li>\n<h4>3.4 \u9636\u6bb5\u56db&#xff1a;\u54cd\u5e94\u56de\u4f20<\/h4>\n<p>Worker \u628a\u8f93\u51fa\u901a\u8fc7 FCGI_STDOUT \u5199\u56de Nginx&#xff0c;Nginx \u518d\u7ec4\u88c5\u6210\u6807\u51c6 HTTP \u54cd\u5e94&#xff08;\u8865\u4e0a\u72b6\u6001\u884c\u3001\u54cd\u5e94\u5934&#xff09;\u8fd4\u56de\u7ed9\u6d4f\u89c8\u5668\u3002\u81f3\u6b64\u4e00\u6b21\u8bf7\u6c42\u7ed3\u675f&#xff0c;Worker \u8fdb\u7a0b\u5e76\u4e0d\u9000\u51fa&#xff0c;\u800c\u662f\u56de\u5230\u7a7a\u95f2\u72b6\u6001\u7b49\u5f85\u4e0b\u4e00\u4e2a\u8bf7\u6c42\u3002<\/p>\n<p>\u628a\u56db\u4e2a\u9636\u6bb5\u4e32\u6210\u4e00\u6761\u72b6\u6001\u6d41\u8f6c&#xff0c;\u53ef\u4ee5\u66f4\u76f4\u89c2\u5730\u770b\u5230\u8bf7\u6c42\u5728\u94fe\u8def\u4e2d\u7684\u63a8\u8fdb&#xff1a;<\/p>\n<p>  #mermaid-svg-8OhfRqLeHM1BogbD{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-8OhfRqLeHM1BogbD .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-8OhfRqLeHM1BogbD .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-8OhfRqLeHM1BogbD .error-icon{fill:#552222;}#mermaid-svg-8OhfRqLeHM1BogbD .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-8OhfRqLeHM1BogbD .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-8OhfRqLeHM1BogbD .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-8OhfRqLeHM1BogbD .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-8OhfRqLeHM1BogbD .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-8OhfRqLeHM1BogbD .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-8OhfRqLeHM1BogbD .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-8OhfRqLeHM1BogbD .marker{fill:#333333;stroke:#333333;}#mermaid-svg-8OhfRqLeHM1BogbD .marker.cross{stroke:#333333;}#mermaid-svg-8OhfRqLeHM1BogbD svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-8OhfRqLeHM1BogbD p{margin:0;}#mermaid-svg-8OhfRqLeHM1BogbD .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-8OhfRqLeHM1BogbD .cluster-label text{fill:#333;}#mermaid-svg-8OhfRqLeHM1BogbD .cluster-label span{color:#333;}#mermaid-svg-8OhfRqLeHM1BogbD .cluster-label span p{background-color:transparent;}#mermaid-svg-8OhfRqLeHM1BogbD .label text,#mermaid-svg-8OhfRqLeHM1BogbD span{fill:#333;color:#333;}#mermaid-svg-8OhfRqLeHM1BogbD .node rect,#mermaid-svg-8OhfRqLeHM1BogbD .node circle,#mermaid-svg-8OhfRqLeHM1BogbD .node ellipse,#mermaid-svg-8OhfRqLeHM1BogbD .node polygon,#mermaid-svg-8OhfRqLeHM1BogbD .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-8OhfRqLeHM1BogbD .rough-node .label text,#mermaid-svg-8OhfRqLeHM1BogbD .node .label text,#mermaid-svg-8OhfRqLeHM1BogbD .image-shape .label,#mermaid-svg-8OhfRqLeHM1BogbD .icon-shape .label{text-anchor:middle;}#mermaid-svg-8OhfRqLeHM1BogbD .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-8OhfRqLeHM1BogbD .rough-node .label,#mermaid-svg-8OhfRqLeHM1BogbD .node .label,#mermaid-svg-8OhfRqLeHM1BogbD .image-shape .label,#mermaid-svg-8OhfRqLeHM1BogbD .icon-shape .label{text-align:center;}#mermaid-svg-8OhfRqLeHM1BogbD .node.clickable{cursor:pointer;}#mermaid-svg-8OhfRqLeHM1BogbD .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-8OhfRqLeHM1BogbD .arrowheadPath{fill:#333333;}#mermaid-svg-8OhfRqLeHM1BogbD .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-8OhfRqLeHM1BogbD .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-8OhfRqLeHM1BogbD .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-8OhfRqLeHM1BogbD .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-8OhfRqLeHM1BogbD .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-8OhfRqLeHM1BogbD .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-8OhfRqLeHM1BogbD .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-8OhfRqLeHM1BogbD .cluster text{fill:#333;}#mermaid-svg-8OhfRqLeHM1BogbD .cluster span{color:#333;}#mermaid-svg-8OhfRqLeHM1BogbD div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-8OhfRqLeHM1BogbD .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-8OhfRqLeHM1BogbD rect.text{fill:none;stroke-width:0;}#mermaid-svg-8OhfRqLeHM1BogbD .icon-shape,#mermaid-svg-8OhfRqLeHM1BogbD .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-8OhfRqLeHM1BogbD .icon-shape p,#mermaid-svg-8OhfRqLeHM1BogbD .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-8OhfRqLeHM1BogbD .icon-shape .label rect,#mermaid-svg-8OhfRqLeHM1BogbD .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-8OhfRqLeHM1BogbD .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-8OhfRqLeHM1BogbD .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-8OhfRqLeHM1BogbD :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u4e0b\u4e00\u4e2a\u8bf7\u6c42<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u9636\u6bb5\u4e00&#xff1a;Nginx \u63a5\u6536\u8bf7\u6c42<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u9636\u6bb5\u4e8c&#xff1a;FastCGI \u534f\u8bae\u5c01\u88c5<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u9636\u6bb5\u4e09&#xff1a;PHP-FPM \u8c03\u5ea6\u5230 Worker<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u9636\u6bb5\u56db&#xff1a;\u54cd\u5e94\u56de\u4f20<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Worker \u56de\u5230\u7a7a\u95f2&#xff0c;\u7b49\u5f85\u4e0b\u4e00\u8bf7\u6c42<\/p>\n<p><\/span><\/p>\n<h3>4. PHP-FPM \u7684\u8fdb\u7a0b\u6a21\u578b<\/h3>\n<h4>4.1 Master \/ Worker \u53cc\u5c42\u7ed3\u6784<\/h4>\n<p>  #mermaid-svg-QYTFQfcrus24KKO4{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-QYTFQfcrus24KKO4 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-QYTFQfcrus24KKO4 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-QYTFQfcrus24KKO4 .error-icon{fill:#552222;}#mermaid-svg-QYTFQfcrus24KKO4 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-QYTFQfcrus24KKO4 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-QYTFQfcrus24KKO4 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-QYTFQfcrus24KKO4 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-QYTFQfcrus24KKO4 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-QYTFQfcrus24KKO4 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-QYTFQfcrus24KKO4 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-QYTFQfcrus24KKO4 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-QYTFQfcrus24KKO4 .marker.cross{stroke:#333333;}#mermaid-svg-QYTFQfcrus24KKO4 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-QYTFQfcrus24KKO4 p{margin:0;}#mermaid-svg-QYTFQfcrus24KKO4 .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-QYTFQfcrus24KKO4 .cluster-label text{fill:#333;}#mermaid-svg-QYTFQfcrus24KKO4 .cluster-label span{color:#333;}#mermaid-svg-QYTFQfcrus24KKO4 .cluster-label span p{background-color:transparent;}#mermaid-svg-QYTFQfcrus24KKO4 .label text,#mermaid-svg-QYTFQfcrus24KKO4 span{fill:#333;color:#333;}#mermaid-svg-QYTFQfcrus24KKO4 .node rect,#mermaid-svg-QYTFQfcrus24KKO4 .node circle,#mermaid-svg-QYTFQfcrus24KKO4 .node ellipse,#mermaid-svg-QYTFQfcrus24KKO4 .node polygon,#mermaid-svg-QYTFQfcrus24KKO4 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-QYTFQfcrus24KKO4 .rough-node .label text,#mermaid-svg-QYTFQfcrus24KKO4 .node .label text,#mermaid-svg-QYTFQfcrus24KKO4 .image-shape .label,#mermaid-svg-QYTFQfcrus24KKO4 .icon-shape .label{text-anchor:middle;}#mermaid-svg-QYTFQfcrus24KKO4 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-QYTFQfcrus24KKO4 .rough-node .label,#mermaid-svg-QYTFQfcrus24KKO4 .node .label,#mermaid-svg-QYTFQfcrus24KKO4 .image-shape .label,#mermaid-svg-QYTFQfcrus24KKO4 .icon-shape .label{text-align:center;}#mermaid-svg-QYTFQfcrus24KKO4 .node.clickable{cursor:pointer;}#mermaid-svg-QYTFQfcrus24KKO4 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-QYTFQfcrus24KKO4 .arrowheadPath{fill:#333333;}#mermaid-svg-QYTFQfcrus24KKO4 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-QYTFQfcrus24KKO4 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-QYTFQfcrus24KKO4 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-QYTFQfcrus24KKO4 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-QYTFQfcrus24KKO4 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-QYTFQfcrus24KKO4 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-QYTFQfcrus24KKO4 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-QYTFQfcrus24KKO4 .cluster text{fill:#333;}#mermaid-svg-QYTFQfcrus24KKO4 .cluster span{color:#333;}#mermaid-svg-QYTFQfcrus24KKO4 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-QYTFQfcrus24KKO4 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-QYTFQfcrus24KKO4 rect.text{fill:none;stroke-width:0;}#mermaid-svg-QYTFQfcrus24KKO4 .icon-shape,#mermaid-svg-QYTFQfcrus24KKO4 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-QYTFQfcrus24KKO4 .icon-shape p,#mermaid-svg-QYTFQfcrus24KKO4 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-QYTFQfcrus24KKO4 .icon-shape .label rect,#mermaid-svg-QYTFQfcrus24KKO4 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-QYTFQfcrus24KKO4 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-QYTFQfcrus24KKO4 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-QYTFQfcrus24KKO4 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>PHP-FPM Master \u8fdb\u7a0b<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Worker \u8fdb\u7a0b 1<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Worker \u8fdb\u7a0b 2<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Worker \u8fdb\u7a0b N<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5904\u7406\u8bf7\u6c42 \/ \u7a7a\u95f2\u7b49\u5f85<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u76d1\u542c\u4fe1\u53f7 \/ \u5e73\u6ed1\u91cd\u8f7d \/ \u8fdb\u7a0b\u7ba1\u7406<\/p>\n<p><\/span><\/p>\n<ul>\n<li>Master \u8fdb\u7a0b&#xff1a;\u53ea\u8d1f\u8d23\u7ba1\u7406&#xff0c;\u4e0d\u5904\u7406\u8bf7\u6c42\u3002\u76d1\u542c SIGUSR2 \u505a\u5e73\u6ed1\u91cd\u8f7d\u3001SIGQUIT \u4f18\u96c5\u9000\u51fa&#xff0c;\u6839\u636e pm \u7b56\u7565\u52a8\u6001\u589e\u51cf Worker\u3002<\/li>\n<li>Worker \u8fdb\u7a0b&#xff1a;\u771f\u6b63\u5e72\u6d3b\u7684\u8fdb\u7a0b&#xff0c;\u6bcf\u4e2a\u8fdb\u7a0b\u540c\u4e00\u65f6\u523b\u53ea\u5904\u7406\u4e00\u4e2a\u8bf7\u6c42&#xff08;\u5355\u7ebf\u7a0b\u540c\u6b65\u6a21\u578b&#xff09;\u3002<\/li>\n<\/ul>\n<h4>4.2 \u4e09\u79cd\u8fdb\u7a0b\u7ba1\u7406\u7b56\u7565<\/h4>\n<table>\n<tr>\u7b56\u7565\u8bf4\u660e\u9002\u7528\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td>static<\/td>\n<td>\u56fa\u5b9a\u6570\u91cf Worker&#xff0c;\u542f\u52a8\u5373\u521b\u5efa<\/td>\n<td>\u6d41\u91cf\u7a33\u5b9a\u3001\u8ffd\u6c42\u4f4e\u5ef6\u8fdf<\/td>\n<\/tr>\n<tr>\n<td>dynamic<\/td>\n<td>\u7a7a\u95f2\u65f6\u7f29\u5bb9&#xff0c;\u7e41\u5fd9\u65f6\u6269\u5bb9&#xff0c;\u6709 start_servers \/ min_spare_servers \/ max_spare_servers<\/td>\n<td>\u5927\u591a\u6570\u901a\u7528\u573a\u666f<\/td>\n<\/tr>\n<tr>\n<td>ondemand<\/td>\n<td>\u6709\u8bf7\u6c42\u624d\u521b\u5efa Worker&#xff0c;\u7a7a\u95f2\u4e00\u6bb5\u65f6\u95f4\u540e\u9500\u6bc1<\/td>\n<td>\u4f4e\u6d41\u91cf\u3001\u5185\u5b58\u654f\u611f\u573a\u666f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>pm &#061; dynamic<br \/>\npm.max_children &#061; 50<br \/>\npm.start_servers &#061; 10<br \/>\npm.min_spare_servers &#061; 5<br \/>\npm.max_spare_servers &#061; 20<br \/>\npm.max_requests &#061; 500<\/p>\n<p>\u5176\u4e2d pm.max_requests \u5f88\u5173\u952e&#xff1a;Worker \u5904\u7406\u6ee1 N \u4e2a\u8bf7\u6c42\u540e\u81ea\u52a8\u9000\u51fa\u5e76\u7531 Master \u91cd\u5efa&#xff0c;\u7528\u6765\u89c4\u907f\u7b2c\u4e09\u65b9\u6269\u5c55\u7684\u5185\u5b58\u6cc4\u6f0f\u3002<\/p>\n<p>\u4e09\u79cd\u7b56\u7565\u5728\u8fdb\u7a0b\u6570\u91cf\u968f\u6d41\u91cf\u53d8\u5316\u4e0a\u7684\u5dee\u5f02&#xff0c;\u53ef\u4ee5\u7528\u4e0b\u56fe\u5bf9\u6bd4&#xff1a;<\/p>\n<p>  #mermaid-svg-OSGBTKPwjCUPciwT{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-OSGBTKPwjCUPciwT .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-OSGBTKPwjCUPciwT .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-OSGBTKPwjCUPciwT .error-icon{fill:#552222;}#mermaid-svg-OSGBTKPwjCUPciwT .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-OSGBTKPwjCUPciwT .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-OSGBTKPwjCUPciwT .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-OSGBTKPwjCUPciwT .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-OSGBTKPwjCUPciwT .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-OSGBTKPwjCUPciwT .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-OSGBTKPwjCUPciwT .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-OSGBTKPwjCUPciwT .marker{fill:#333333;stroke:#333333;}#mermaid-svg-OSGBTKPwjCUPciwT .marker.cross{stroke:#333333;}#mermaid-svg-OSGBTKPwjCUPciwT svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-OSGBTKPwjCUPciwT p{margin:0;}#mermaid-svg-OSGBTKPwjCUPciwT .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-OSGBTKPwjCUPciwT .cluster-label text{fill:#333;}#mermaid-svg-OSGBTKPwjCUPciwT .cluster-label span{color:#333;}#mermaid-svg-OSGBTKPwjCUPciwT .cluster-label span p{background-color:transparent;}#mermaid-svg-OSGBTKPwjCUPciwT .label text,#mermaid-svg-OSGBTKPwjCUPciwT span{fill:#333;color:#333;}#mermaid-svg-OSGBTKPwjCUPciwT .node rect,#mermaid-svg-OSGBTKPwjCUPciwT .node circle,#mermaid-svg-OSGBTKPwjCUPciwT .node ellipse,#mermaid-svg-OSGBTKPwjCUPciwT .node polygon,#mermaid-svg-OSGBTKPwjCUPciwT .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-OSGBTKPwjCUPciwT .rough-node .label text,#mermaid-svg-OSGBTKPwjCUPciwT .node .label text,#mermaid-svg-OSGBTKPwjCUPciwT .image-shape .label,#mermaid-svg-OSGBTKPwjCUPciwT .icon-shape .label{text-anchor:middle;}#mermaid-svg-OSGBTKPwjCUPciwT .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-OSGBTKPwjCUPciwT .rough-node .label,#mermaid-svg-OSGBTKPwjCUPciwT .node .label,#mermaid-svg-OSGBTKPwjCUPciwT .image-shape .label,#mermaid-svg-OSGBTKPwjCUPciwT .icon-shape .label{text-align:center;}#mermaid-svg-OSGBTKPwjCUPciwT .node.clickable{cursor:pointer;}#mermaid-svg-OSGBTKPwjCUPciwT .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-OSGBTKPwjCUPciwT .arrowheadPath{fill:#333333;}#mermaid-svg-OSGBTKPwjCUPciwT .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-OSGBTKPwjCUPciwT .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-OSGBTKPwjCUPciwT .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-OSGBTKPwjCUPciwT .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-OSGBTKPwjCUPciwT .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-OSGBTKPwjCUPciwT .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-OSGBTKPwjCUPciwT .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-OSGBTKPwjCUPciwT .cluster text{fill:#333;}#mermaid-svg-OSGBTKPwjCUPciwT .cluster span{color:#333;}#mermaid-svg-OSGBTKPwjCUPciwT div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-OSGBTKPwjCUPciwT .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-OSGBTKPwjCUPciwT rect.text{fill:none;stroke-width:0;}#mermaid-svg-OSGBTKPwjCUPciwT .icon-shape,#mermaid-svg-OSGBTKPwjCUPciwT .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-OSGBTKPwjCUPciwT .icon-shape p,#mermaid-svg-OSGBTKPwjCUPciwT .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-OSGBTKPwjCUPciwT .icon-shape .label rect,#mermaid-svg-OSGBTKPwjCUPciwT .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-OSGBTKPwjCUPciwT .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-OSGBTKPwjCUPciwT .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-OSGBTKPwjCUPciwT :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>ondemand&#xff1a;\u6709\u8bf7\u6c42\u624d\u521b\u5efa<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u7a7a\u95f2 \u2192 \u9500\u6bc1 Worker<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u6709\u8bf7\u6c42 \u2192 \u65b0\u5efa Worker<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>dynamic&#xff1a;\u6309\u9700\u4f38\u7f29<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u6d41\u91cf\u4f4e \u2192 \u7f29\u5bb9\u81f3 min_spare<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u6d41\u91cf\u9ad8 \u2192 \u6269\u5bb9\u81f3 max_children<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>static&#xff1a;\u56fa\u5b9a\u6570\u91cf<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u6d41\u91cf\u4f4e \u2192 Worker \u6570\u4e0d\u53d8<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u6d41\u91cf\u9ad8 \u2192 Worker \u6570\u4e0d\u53d8<\/p>\n<p><\/span><\/p>\n<h4>4.3 \u4e3a\u4ec0\u4e48 PHP \u4e0d\u9700\u8981\u8fde\u63a5\u6c60<\/h4>\n<p>\u56e0\u4e3a\u6bcf\u4e2a Worker \u662f\u540c\u6b65\u963b\u585e\u5904\u7406\u8bf7\u6c42\u7684&#xff0c;\u4e00\u4e2a\u8fdb\u7a0b\u540c\u4e00\u65f6\u523b\u53ea\u670d\u52a1\u4e00\u4e2a\u8bf7\u6c42&#xff0c;\u6240\u4ee5\u8fdb\u7a0b\u5185\u7684\u6570\u636e\u5e93\u8fde\u63a5\u5929\u7136\u4e0d\u4f1a\u88ab\u5e76\u53d1\u4e89\u7528\u3002\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48 PHP \u91cc&#034;\u8fde\u63a5\u6c60&#034;\u901a\u5e38\u8981\u9760 pgbouncer\u3001ProxySQL \u8fd9\u7c7b\u5916\u90e8\u7ec4\u4ef6&#xff0c;\u800c\u4e0d\u662f\u50cf Java \u90a3\u6837\u5728\u5e94\u7528\u5185\u7ef4\u62a4 HikariCP\u3002<\/p>\n<h3>5. \u4e0e Java \u5e38\u9a7b\u6a21\u578b\u7684\u672c\u8d28\u5dee\u5f02<\/h3>\n<p>\u5f88\u591a\u4eba\u628a&#034;PHP-FPM \u8fdb\u7a0b\u5e38\u9a7b&#034;\u548c&#034;Java \u5e94\u7528\u5e38\u9a7b&#034;\u6df7\u4e3a\u4e00\u8c08&#xff0c;\u5176\u5b9e\u4e24\u8005\u5e38\u9a7b\u7684\u7c92\u5ea6\u5b8c\u5168\u4e0d\u540c\u3002<\/p>\n<table>\n<tr>\u7ef4\u5ea6PHP-FPMJava&#xff08;Spring Boot \u7b49&#xff09;<\/tr>\n<tbody>\n<tr>\n<td>\u5e38\u9a7b\u5bf9\u8c61<\/td>\n<td>\u8fdb\u7a0b\u5e38\u9a7b&#xff0c;\u5e94\u7528\u72b6\u6001\u4e0d\u5e38\u9a7b<\/td>\n<td>\u8fdb\u7a0b\u5e38\u9a7b&#xff0c;\u5e94\u7528\u72b6\u6001\u5e38\u9a7b<\/td>\n<\/tr>\n<tr>\n<td>\u8bf7\u6c42\u5904\u7406<\/td>\n<td>\u6bcf\u8bf7\u6c42\u91cd\u5efa\u811a\u672c\u4e0a\u4e0b\u6587<\/td>\n<td>\u540c\u4e00 JVM \u5185\u591a\u7ebf\u7a0b\u5171\u4eab\u5806\u5185\u5b58<\/td>\n<\/tr>\n<tr>\n<td>\u5e76\u53d1\u6a21\u578b<\/td>\n<td>\u591a\u8fdb\u7a0b &#043; \u540c\u6b65\u963b\u585e<\/td>\n<td>\u5355\u8fdb\u7a0b\u591a\u7ebf\u7a0b&#xff08;\u6216\u534f\u7a0b&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u5b58\u5171\u4eab<\/td>\n<td>\u8fdb\u7a0b\u95f4\u4e0d\u5171\u4eab&#xff08;\u9664 OPcache \u5171\u4eab\u5185\u5b58&#xff09;<\/td>\n<td>\u7ebf\u7a0b\u95f4\u5171\u4eab\u5806\u5bf9\u8c61<\/td>\n<\/tr>\n<tr>\n<td>\u8fde\u63a5\u6c60<\/td>\n<td>\u4e00\u822c\u65e0&#xff08;\u9760\u5916\u90e8\u4e2d\u95f4\u4ef6&#xff09;<\/td>\n<td>\u5e94\u7528\u5185\u8fde\u63a5\u6c60&#xff08;HikariCP \u7b49&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u70ed\u66f4\u65b0<\/td>\n<td>reload \u5e73\u6ed1\u91cd\u542f Worker<\/td>\n<td>\u9700\u91cd\u542f\u6216\u501f\u52a9\u70ed\u90e8\u7f72\u5de5\u5177<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u5b58\u6cc4\u6f0f\u5f71\u54cd<\/td>\n<td>\u5355 Worker \u6cc4\u6f0f&#xff0c;max_requests \u53ef\u515c\u5e95<\/td>\n<td>\u6574\u4e2a JVM \u53d7\u5f71\u54cd&#xff0c;\u53ef\u80fd OOM<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e00\u53e5\u8bdd\u603b\u7ed3&#xff1a;PHP-FPM \u5e38\u9a7b\u7684\u662f&#034;\u6267\u884c\u73af\u5883&#034;&#xff0c;Java \u5e38\u9a7b\u7684\u662f&#034;\u5e94\u7528\u5b9e\u4f8b&#034;\u3002PHP \u6bcf\u6b21\u8bf7\u6c42\u90fd\u4ece&#034;\u5e72\u51c0&#034;\u7684\u72b6\u6001\u5f00\u59cb&#xff0c;\u8fd9\u65e2\u662f\u5b83\u7684\u7b80\u5355\u4e4b\u5904&#xff0c;\u4e5f\u662f\u5b83\u65e0\u6cd5\u505a\u8fdb\u7a0b\u5185\u7f13\u5b58\u3001\u8fde\u63a5\u6c60\u3001\u957f\u8fde\u63a5\u63a8\u9001\u7684\u6839\u672c\u539f\u56e0\u3002<\/p>\n<p>\u4ece\u8bf7\u6c42\u5904\u7406\u7684\u89d2\u5ea6\u770b&#xff0c;\u4e24\u8005\u7684\u5dee\u5f02\u53ef\u4ee5\u8fd9\u6837\u5bf9\u7167&#xff1a;<\/p>\n<p>  #mermaid-svg-jY82Dm7QrayRK30v{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-jY82Dm7QrayRK30v .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-jY82Dm7QrayRK30v .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-jY82Dm7QrayRK30v .error-icon{fill:#552222;}#mermaid-svg-jY82Dm7QrayRK30v .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-jY82Dm7QrayRK30v .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-jY82Dm7QrayRK30v .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-jY82Dm7QrayRK30v .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-jY82Dm7QrayRK30v .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-jY82Dm7QrayRK30v .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-jY82Dm7QrayRK30v .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-jY82Dm7QrayRK30v .marker{fill:#333333;stroke:#333333;}#mermaid-svg-jY82Dm7QrayRK30v .marker.cross{stroke:#333333;}#mermaid-svg-jY82Dm7QrayRK30v svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-jY82Dm7QrayRK30v p{margin:0;}#mermaid-svg-jY82Dm7QrayRK30v .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-jY82Dm7QrayRK30v .cluster-label text{fill:#333;}#mermaid-svg-jY82Dm7QrayRK30v .cluster-label span{color:#333;}#mermaid-svg-jY82Dm7QrayRK30v .cluster-label span p{background-color:transparent;}#mermaid-svg-jY82Dm7QrayRK30v .label text,#mermaid-svg-jY82Dm7QrayRK30v span{fill:#333;color:#333;}#mermaid-svg-jY82Dm7QrayRK30v .node rect,#mermaid-svg-jY82Dm7QrayRK30v .node circle,#mermaid-svg-jY82Dm7QrayRK30v .node ellipse,#mermaid-svg-jY82Dm7QrayRK30v .node polygon,#mermaid-svg-jY82Dm7QrayRK30v .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-jY82Dm7QrayRK30v .rough-node .label text,#mermaid-svg-jY82Dm7QrayRK30v .node .label text,#mermaid-svg-jY82Dm7QrayRK30v .image-shape .label,#mermaid-svg-jY82Dm7QrayRK30v .icon-shape .label{text-anchor:middle;}#mermaid-svg-jY82Dm7QrayRK30v .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-jY82Dm7QrayRK30v .rough-node .label,#mermaid-svg-jY82Dm7QrayRK30v .node .label,#mermaid-svg-jY82Dm7QrayRK30v .image-shape .label,#mermaid-svg-jY82Dm7QrayRK30v .icon-shape .label{text-align:center;}#mermaid-svg-jY82Dm7QrayRK30v .node.clickable{cursor:pointer;}#mermaid-svg-jY82Dm7QrayRK30v .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-jY82Dm7QrayRK30v .arrowheadPath{fill:#333333;}#mermaid-svg-jY82Dm7QrayRK30v .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-jY82Dm7QrayRK30v .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-jY82Dm7QrayRK30v .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-jY82Dm7QrayRK30v .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-jY82Dm7QrayRK30v .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-jY82Dm7QrayRK30v .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-jY82Dm7QrayRK30v .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-jY82Dm7QrayRK30v .cluster text{fill:#333;}#mermaid-svg-jY82Dm7QrayRK30v .cluster span{color:#333;}#mermaid-svg-jY82Dm7QrayRK30v div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-jY82Dm7QrayRK30v .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-jY82Dm7QrayRK30v rect.text{fill:none;stroke-width:0;}#mermaid-svg-jY82Dm7QrayRK30v .icon-shape,#mermaid-svg-jY82Dm7QrayRK30v .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-jY82Dm7QrayRK30v .icon-shape p,#mermaid-svg-jY82Dm7QrayRK30v .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-jY82Dm7QrayRK30v .icon-shape .label rect,#mermaid-svg-jY82Dm7QrayRK30v .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-jY82Dm7QrayRK30v .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-jY82Dm7QrayRK30v .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-jY82Dm7QrayRK30v :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>Java&#xff1a;\u8fdb\u7a0b\u5e38\u9a7b&#xff0c;\u72b6\u6001\u5e38\u9a7b<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u8bf7\u6c42\u8fdb\u5165<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u590d\u7528 JVM \u5806\u5185\u5bf9\u8c61<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u7ebf\u7a0b\u5904\u7406\u4e1a\u52a1<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u8bf7\u6c42\u7ed3\u675f&#xff0c;\u5bf9\u8c61\u4ecd\u5b58\u6d3b<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>PHP-FPM&#xff1a;\u8fdb\u7a0b\u5e38\u9a7b&#xff0c;\u72b6\u6001\u4e0d\u5e38\u9a7b<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u8bf7\u6c42\u8fdb\u5165<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u91cd\u5efa\u811a\u672c\u4e0a\u4e0b\u6587<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u6267\u884c\u811a\u672c<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u8bf7\u6c42\u7ed3\u675f&#xff0c;\u72b6\u6001\u9500\u6bc1<\/p>\n<p><\/span><\/p>\n<h3>6. \u5168\u94fe\u8def\u65f6\u5e8f\u56fe<\/h3>\n<p>     &#034;PHP \u811a\u672c \/ OPcache&#034;<\/p>\n<p>     &#034;PHP-FPM Worker&#034;<\/p>\n<p>     &#034;PHP-FPM Master&#034;<\/p>\n<p>     &#034;Nginx Worker&#034;<\/p>\n<p>     &#034;\u6d4f\u89c8\u5668&#034;<\/p>\n<p>      &#034;PHP \u811a\u672c \/ OPcache&#034;<\/p>\n<p>      &#034;PHP-FPM Worker&#034;<\/p>\n<p>      &#034;PHP-FPM Master&#034;<\/p>\n<p>      &#034;Nginx Worker&#034;<\/p>\n<p>      &#034;\u6d4f\u89c8\u5668&#034;<\/p>\n<p>  #mermaid-svg-dqiENUr9UDg26TN7{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-dqiENUr9UDg26TN7 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-dqiENUr9UDg26TN7 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-dqiENUr9UDg26TN7 .error-icon{fill:#552222;}#mermaid-svg-dqiENUr9UDg26TN7 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-dqiENUr9UDg26TN7 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-dqiENUr9UDg26TN7 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-dqiENUr9UDg26TN7 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-dqiENUr9UDg26TN7 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-dqiENUr9UDg26TN7 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-dqiENUr9UDg26TN7 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-dqiENUr9UDg26TN7 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-dqiENUr9UDg26TN7 .marker.cross{stroke:#333333;}#mermaid-svg-dqiENUr9UDg26TN7 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-dqiENUr9UDg26TN7 p{margin:0;}#mermaid-svg-dqiENUr9UDg26TN7 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-dqiENUr9UDg26TN7 text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-svg-dqiENUr9UDg26TN7 .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-dqiENUr9UDg26TN7 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-dqiENUr9UDg26TN7 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-dqiENUr9UDg26TN7 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-dqiENUr9UDg26TN7 #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-dqiENUr9UDg26TN7 .sequenceNumber{fill:white;}#mermaid-svg-dqiENUr9UDg26TN7 #sequencenumber{fill:#333;}#mermaid-svg-dqiENUr9UDg26TN7 #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-dqiENUr9UDg26TN7 .messageText{fill:#333;stroke:none;}#mermaid-svg-dqiENUr9UDg26TN7 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-dqiENUr9UDg26TN7 .labelText,#mermaid-svg-dqiENUr9UDg26TN7 .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-dqiENUr9UDg26TN7 .loopText,#mermaid-svg-dqiENUr9UDg26TN7 .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-dqiENUr9UDg26TN7 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-dqiENUr9UDg26TN7 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-dqiENUr9UDg26TN7 .noteText,#mermaid-svg-dqiENUr9UDg26TN7 .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-dqiENUr9UDg26TN7 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-dqiENUr9UDg26TN7 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-dqiENUr9UDg26TN7 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-dqiENUr9UDg26TN7 .actorPopupMenu{position:absolute;}#mermaid-svg-dqiENUr9UDg26TN7 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 \/ 0.4));}#mermaid-svg-dqiENUr9UDg26TN7 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-dqiENUr9UDg26TN7 .actor-man circle,#mermaid-svg-dqiENUr9UDg26TN7 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-dqiENUr9UDg26TN7 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>     &#034;Worker \u4e0d\u9000\u51fa&#xff0c;\u56de\u5230\u7a7a\u95f2\u7b49\u5f85\u4e0b\u4e00\u4e2a\u8bf7\u6c42&#034;<\/p>\n<p>   &#034;HTTP GET \/index.php&#034;<\/p>\n<p>   &#034;\u5339\u914d location&#xff0c;\u5224\u65ad\u4e3a\u52a8\u6001\u8bf7\u6c42&#034;<\/p>\n<p>   &#034;FastCGI \u8fde\u63a5&#xff08;Unix Socket \/ TCP&#xff09;&#034;<\/p>\n<p>   &#034;\u8c03\u5ea6\u7a7a\u95f2 Worker&#034;<\/p>\n<p>   &#034;\u89e3\u6790 FCGI_PARAMS&#xff0c;\u6784\u5efa\u8d85\u5168\u5c40\u53d8\u91cf&#034;<\/p>\n<p>   &#034;\u521d\u59cb\u5316\u8bf7\u6c42\u4e0a\u4e0b\u6587&#034;<\/p>\n<p>   &#034;OPcache \u547d\u4e2d\u5219\u76f4\u63a5\u6267\u884c opcode&#034;<\/p>\n<p>   &#034;\u8f93\u51fa\u5199\u5165\u7f13\u51b2\u533a&#034;<\/p>\n<p>   &#034;FCGI_STDOUT \u56de\u4f20&#034;<\/p>\n<p>   &#034;\u7ec4\u88c5 HTTP \u54cd\u5e94\u8fd4\u56de&#034;<\/p>\n<p>   &#034;\u8bf7\u6c42\u6536\u5c3e&#xff1a;\u6790\u6784\u3001\u5173\u8fde\u63a5\u3001\u91ca\u653e\u5185\u5b58&#034;<\/p>\n<h3>7. \u5b9e\u8df5\u5efa\u8bae<\/h3>\n<li>\u5408\u7406\u8bbe\u7f6e pm.max_children&#xff1a;\u6309 \u53ef\u7528\u5185\u5b58 \/ \u5355\u8fdb\u7a0b\u5185\u5b58 \u4f30\u7b97&#xff0c;\u76f2\u76ee\u8c03\u5927\u4f1a\u5bfc\u81f4\u5185\u5b58 swap&#xff0c;\u53cd\u800c\u62d6\u6162\u6574\u4f53\u3002<\/li>\n<li>\u5f00\u542f OPcache&#xff1a;opcache.enable&#061;1\u3001opcache.validate_timestamps&#061;0&#xff08;\u751f\u4ea7\u73af\u5883\u914d\u5408\u53d1\u5e03\u65f6 reload&#xff09;&#xff0c;\u80fd\u663e\u8457\u51cf\u5c11\u7f16\u8bd1\u5f00\u9500\u3002<\/li>\n<li>\u7528 pm.max_requests \u515c\u5e95\u5185\u5b58\u6cc4\u6f0f&#xff1a;\u5c24\u5176\u662f\u7528\u4e86\u8001\u65e7\u6269\u5c55\u7684\u9879\u76ee\u3002<\/li>\n<li>\u4e0d\u8981\u5728 PHP \u91cc\u505a\u8fdb\u7a0b\u5185\u7f13\u5b58&#xff1a;static \u53d8\u91cf\u3001\u5168\u5c40\u6570\u7ec4\u5728\u8bf7\u6c42\u7ed3\u675f\u540e\u90fd\u4f1a\u9500\u6bc1&#xff0c;\u9700\u8981\u7f13\u5b58\u8bf7\u7528 Redis \/ Memcached\u3002<\/li>\n<li>\u957f\u8017\u65f6\u4efb\u52a1\u4ea4\u7ed9\u961f\u5217&#xff1a;PHP-FPM Worker \u6570\u91cf\u6709\u9650&#xff0c;\u540c\u6b65\u6267\u884c\u8017\u65f6\u4efb\u52a1\u4f1a\u8fc5\u901f\u8017\u5c3d\u8fdb\u7a0b\u6c60\u3002<\/li>\n<h3>8. \u5c0f\u7ed3<\/h3>\n<p>\u7406\u89e3 PHP \u751f\u547d\u5468\u671f&#xff0c;\u6838\u5fc3\u5c31\u4e09\u53e5\u8bdd&#xff1a;<\/p>\n<ul>\n<li>Nginx \u8d1f\u8d23\u63a5\u5165\u4e0e\u8f6c\u53d1&#xff0c;FastCGI \u8d1f\u8d23\u534f\u8bae\u8f6c\u6362&#xff0c;PHP-FPM \u8d1f\u8d23\u8fdb\u7a0b\u8c03\u5ea6&#xff0c;PHP \u89e3\u91ca\u5668\u8d1f\u8d23\u6267\u884c&#xff1b;<\/li>\n<li>\u8fdb\u7a0b\u5e38\u9a7b&#xff0c;\u4f46\u5e94\u7528\u72b6\u6001\u4e0d\u5e38\u9a7b&#xff0c;\u6bcf\u6b21\u8bf7\u6c42\u90fd\u662f\u4e00\u6b21&#034;\u5e72\u51c0\u7684\u521d\u59cb\u5316&#034;&#xff1b;<\/li>\n<li>\u4e0e Java \u7684\u5dee\u5f02\u4e0d\u5728&#034;\u662f\u5426\u5e38\u9a7b&#034;&#xff0c;\u800c\u5728\u5e38\u9a7b\u7684\u7c92\u5ea6\u2014\u2014\u8fd9\u51b3\u5b9a\u4e86\u8fde\u63a5\u6c60\u3001\u7f13\u5b58\u3001\u5e76\u53d1\u6a21\u578b\u7b49\u4e00\u7cfb\u5217\u8bbe\u8ba1\u53d6\u820d\u3002<\/li>\n<\/ul>\n<p>\u628a\u8fd9\u6761\u94fe\u8def\u5728\u8111\u5b50\u91cc\u8dd1\u901a&#xff0c;\u518d\u9047\u5230&#034;PHP \u4e3a\u4ec0\u4e48\u6162&#034;\u201c\u8fdb\u7a0b\u6570\u600e\u4e48\u8c03\u201d&#034;\u4e3a\u4ec0\u4e48\u6ca1\u6709\u8fde\u63a5\u6c60&#034;\u8fd9\u7c7b\u95ee\u9898&#xff0c;\u5c31\u80fd\u4ece\u6839\u4e0a\u89e3\u91ca\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55<br \/>\n1. \u5f15\u8a00&#xff1a;\u4e3a\u4ec0\u4e48\u9700\u8981\u7406\u89e3 PHP \u7684\u751f\u547d\u5468\u671f2. \u5148\u5efa\u7acb\u6574\u4f53\u8ba4\u77e5&#xff1a;\u4e09\u4e2a\u89d2\u82723. \u4e00\u6b21\u8bf7\u6c42\u7684\u5b8c\u6574\u751f\u547d\u5468\u671f 3.1 \u9636\u6bb5\u4e00&#xff1a;Nginx \u63a5\u6536\u8bf7\u6c423.2 \u9636\u6bb5\u4e8c&#xff1a;FastCGI \u534f\u8bae\u5c01\u88c53.3 \u9636\u6bb5\u4e09&#xff1a;PHP-FPM \u8c03\u5ea6\u5230 Worker3.4 \u9636\u6bb5\u56db&#xff1a;\u54cd\u5e94\u56de\u4f20 4. PHP-FPM \u7684\u8fdb\u7a0b\u6a21\u578b 4.1 Master \/ Worker \u53cc\u5c42\u7ed3\u67844.2 \u4e09\u79cd\u8fdb\u7a0b\u7ba1\u7406\u7b56\u75654.3 \u4e3a\u4ec0\u4e48 PHP<\/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":[13178,117,230],"topic":[],"class_list":["post-118951","post","type-post","status-publish","format-standard","hentry","category-server","tag-1024---","tag-nginx","tag-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP \u751f\u547d\u5468\u671f\u4e0e PHP-FPM \u5de5\u4f5c\u6a21\u5f0f\uff1a\u4ece Nginx \u5230 PHP \u6267\u884c\u5b8c\u6bd5\u7684\u5168\u94fe\u8def\u5256\u6790 - \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\/118951.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP \u751f\u547d\u5468\u671f\u4e0e PHP-FPM \u5de5\u4f5c\u6a21\u5f0f\uff1a\u4ece Nginx \u5230 PHP \u6267\u884c\u5b8c\u6bd5\u7684\u5168\u94fe\u8def\u5256\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 1. \u5f15\u8a00&#xff1a;\u4e3a\u4ec0\u4e48\u9700\u8981\u7406\u89e3 PHP \u7684\u751f\u547d\u5468\u671f2. \u5148\u5efa\u7acb\u6574\u4f53\u8ba4\u77e5&#xff1a;\u4e09\u4e2a\u89d2\u82723. \u4e00\u6b21\u8bf7\u6c42\u7684\u5b8c\u6574\u751f\u547d\u5468\u671f 3.1 \u9636\u6bb5\u4e00&#xff1a;Nginx \u63a5\u6536\u8bf7\u6c423.2 \u9636\u6bb5\u4e8c&#xff1a;FastCGI \u534f\u8bae\u5c01\u88c53.3 \u9636\u6bb5\u4e09&#xff1a;PHP-FPM \u8c03\u5ea6\u5230 Worker3.4 \u9636\u6bb5\u56db&#xff1a;\u54cd\u5e94\u56de\u4f20 4. PHP-FPM \u7684\u8fdb\u7a0b\u6a21\u578b 4.1 Master \/ Worker \u53cc\u5c42\u7ed3\u67844.2 \u4e09\u79cd\u8fdb\u7a0b\u7ba1\u7406\u7b56\u75654.3 \u4e3a\u4ec0\u4e48 PHP\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/118951.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-28T06:16:29+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=\"16 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/118951.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/118951.html\",\"name\":\"PHP \u751f\u547d\u5468\u671f\u4e0e PHP-FPM \u5de5\u4f5c\u6a21\u5f0f\uff1a\u4ece Nginx \u5230 PHP \u6267\u884c\u5b8c\u6bd5\u7684\u5168\u94fe\u8def\u5256\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-28T06:16:29+00:00\",\"dateModified\":\"2026-10-28T06:16:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/118951.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/118951.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/118951.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP \u751f\u547d\u5468\u671f\u4e0e PHP-FPM \u5de5\u4f5c\u6a21\u5f0f\uff1a\u4ece Nginx \u5230 PHP \u6267\u884c\u5b8c\u6bd5\u7684\u5168\u94fe\u8def\u5256\u6790\"}]},{\"@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":"PHP \u751f\u547d\u5468\u671f\u4e0e PHP-FPM \u5de5\u4f5c\u6a21\u5f0f\uff1a\u4ece Nginx \u5230 PHP \u6267\u884c\u5b8c\u6bd5\u7684\u5168\u94fe\u8def\u5256\u6790 - \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\/118951.html","og_locale":"zh_CN","og_type":"article","og_title":"PHP \u751f\u547d\u5468\u671f\u4e0e PHP-FPM \u5de5\u4f5c\u6a21\u5f0f\uff1a\u4ece Nginx \u5230 PHP \u6267\u884c\u5b8c\u6bd5\u7684\u5168\u94fe\u8def\u5256\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u76ee\u5f55 1. \u5f15\u8a00&#xff1a;\u4e3a\u4ec0\u4e48\u9700\u8981\u7406\u89e3 PHP \u7684\u751f\u547d\u5468\u671f2. \u5148\u5efa\u7acb\u6574\u4f53\u8ba4\u77e5&#xff1a;\u4e09\u4e2a\u89d2\u82723. \u4e00\u6b21\u8bf7\u6c42\u7684\u5b8c\u6574\u751f\u547d\u5468\u671f 3.1 \u9636\u6bb5\u4e00&#xff1a;Nginx \u63a5\u6536\u8bf7\u6c423.2 \u9636\u6bb5\u4e8c&#xff1a;FastCGI \u534f\u8bae\u5c01\u88c53.3 \u9636\u6bb5\u4e09&#xff1a;PHP-FPM \u8c03\u5ea6\u5230 Worker3.4 \u9636\u6bb5\u56db&#xff1a;\u54cd\u5e94\u56de\u4f20 4. PHP-FPM \u7684\u8fdb\u7a0b\u6a21\u578b 4.1 Master \/ Worker \u53cc\u5c42\u7ed3\u67844.2 \u4e09\u79cd\u8fdb\u7a0b\u7ba1\u7406\u7b56\u75654.3 \u4e3a\u4ec0\u4e48 PHP","og_url":"https:\/\/www.wsisp.com\/helps\/118951.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-28T06:16:29+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"16 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/118951.html","url":"https:\/\/www.wsisp.com\/helps\/118951.html","name":"PHP \u751f\u547d\u5468\u671f\u4e0e PHP-FPM \u5de5\u4f5c\u6a21\u5f0f\uff1a\u4ece Nginx \u5230 PHP \u6267\u884c\u5b8c\u6bd5\u7684\u5168\u94fe\u8def\u5256\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-28T06:16:29+00:00","dateModified":"2026-10-28T06:16:29+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/118951.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/118951.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/118951.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"PHP \u751f\u547d\u5468\u671f\u4e0e PHP-FPM \u5de5\u4f5c\u6a21\u5f0f\uff1a\u4ece Nginx \u5230 PHP \u6267\u884c\u5b8c\u6bd5\u7684\u5168\u94fe\u8def\u5256\u6790"}]},{"@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\/118951","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=118951"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/118951\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=118951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=118951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=118951"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=118951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}