{"id":882,"date":"2017-01-26T11:56:50","date_gmt":"2017-01-26T02:56:50","guid":{"rendered":"http:\/\/blue-bear.jp\/kb\/?p=882"},"modified":"2017-01-26T11:56:50","modified_gmt":"2017-01-26T02:56:50","slug":"linux-nginx%e3%81%a7502%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%8c%e9%a0%bb%e7%99%ba%e3%81%97%e3%81%9f%e9%9a%9b%e3%81%ab%e3%82%84%e3%82%8b%e3%81%93%e3%81%a8","status":"publish","type":"post","link":"https:\/\/blue-bear.jp\/kb\/linux-nginx%e3%81%a7502%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%8c%e9%a0%bb%e7%99%ba%e3%81%97%e3%81%9f%e9%9a%9b%e3%81%ab%e3%82%84%e3%82%8b%e3%81%93%e3%81%a8\/","title":{"rendered":"[Linux] Nginx\u3067502\u30a8\u30e9\u30fc\u304c\u983b\u767a\u3057\u305f\u969b\u306b\u3084\u308b\u3053\u3068"},"content":{"rendered":"<h2>Nginx\u3067502\u30a8\u30e9\u30fc\u304c\u983b\u767a\u3057\u305f\u969b\u306b\u3084\u308b\u3053\u3068<\/h2>\n<p>Nginx\u3092\u904b\u7528\u3057\u305f\u969b\u306b\u30a2\u30af\u30bb\u30b9\u304c\u5927\u91cf\u306b\u767a\u751f\u3057502\u30a8\u30e9\u30fc(Bad Gateway)\u304c\u767a\u751f\u3057\u307e\u304f\u3063\u305f\u3068\u304d\u306b\u3084\u3063\u305f\u3053\u3068\u3002<\/p>\n<h3>\/etc\/nginx\/nginx.conf<\/h3>\n<p>worker_processes \u3092\u5b9f\u969b\u306eCPU\u306e\u30b3\u30a2\u6570\u3068\u5408\u308f\u305b\u308b<\/p>\n<pre>worker_processes  auto;\r\n<\/pre>\n<p>\u3067\u3082\u826f\u3044\u3089\u3057\u3044\u3002<\/p>\n<p>\u53c2\u8003\uff1a<br \/>\n<a href=\"http:\/\/qiita.com\/iwai\/items\/1e29adbdd269380167d2\">Nginx\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6975\u9650\u306b\u3059\u308b\u305f\u3081\u306e\u8003\u5bdf<\/a><\/p>\n<h3>\/etc\/php-fpm.d\/www.conf<\/h3>\n<p>\/var\/log\/php-fpm\/error.log<br \/>\n\u3092\u898b\u308b\u3068\u304a\u305d\u3089\u304f<\/p>\n<pre>\r\nWARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min\/max_spare_servers), spawning X children, there are X idle, and X total children\r\nWARNING: [pool www] server reached pm.max_children setting (XXX), consider raising it\r\n<\/pre>\n<p>\u3068\u3044\u3046\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3044\u308b\u306f\u305a\u3002<\/p>\n<p>\u3088\u3046\u3084\u304f\u3059\u308b\u3068php-fpm\u306e\u30d7\u30ed\u30bb\u30b9\u6570\u304c\u4e0a\u9650\u306b\u9054\u3057\u307e\u3057\u305f\u3001\u3068\u3044\u3046\u3053\u3068\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\/etc\/php-fpm.d\/www.conf\u3092\u7de8\u96c6\u3057\u3001\u4e0a\u9650\u3092\u4e0a\u3052\u308b<\/p>\n<p>\u4f8b\uff1a\uff11\uff10\uff10\u307e\u3067\u30d7\u30ed\u30bb\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b<\/p>\n<pre>\r\npm.max_children = 100\r\n<\/pre>\n<p>pm.max_children\u3092\u5897\u3084\u305b\u3070\u5897\u3084\u3059\u307b\u3069\u3001\u30e1\u30e2\u30ea\u3068CPU\u3092\u98df\u3046\u306e\u3067\u3001top\u3082\u3057\u304f\u306fhtop\u3067\u30ea\u30bd\u30fc\u30b9\u72b6\u614b\u3092\u898b\u3066\u304a\u304f\u3053\u3068\u3002<br \/>\npm.start_servers\u3000\u3084 pm.min_spare_servers \u3084 pm.max_spare_servers\u3082\u9069\u5b9c\u5909\u3048\u3066\u3082\u3088\u3044\u304c\u3001\u3068\u308a\u3042\u3048\u305apm.max_children\u3060\u3051\u4e0a\u3052\u3066\u3082\u53ef<\/p>\n<p>\u5909\u66f4\u3057\u305f\u3089<\/p>\n<pre>\/etc\/init.d\/php-fpm restart<\/pre>\n<p>\u3057\u3066\u304a\u304f\u3053\u3068\u3002<\/p>\n<p>\u53c2\u7167\uff1a<br \/>\n<a href=\"http:\/\/qiita.com\/nnmr\/items\/a521fb4e18931cc647d6\">php-fpm\u306e\u30a8\u30e9\u30fc\u306b\u3076\u3064\u304b\u308a\u306a\u304c\u3089\u8a2d\u5b9a\u306e\u6700\u9069\u5316\u3092\u56f3\u308b<\/a><br \/>\n<a href=\"http:\/\/blog.rhasm.net\/tune-nginx-and-php-fpm\/\">nginx\u3068php-fpm\u3092\u8abf\u6574\u3059\u308b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx\u3067502\u30a8\u30e9\u30fc\u304c\u983b\u767a\u3057\u305f\u969b\u306b\u3084<\/p>\n","protected":false},"author":1,"featured_media":883,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117,7],"tags":[127,125,126,31],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/882"}],"collection":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/comments?post=882"}],"version-history":[{"count":1,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/882\/revisions"}],"predecessor-version":[{"id":884,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/882\/revisions\/884"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/media\/883"}],"wp:attachment":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/media?parent=882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/categories?post=882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/tags?post=882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}