﻿{"id":760,"date":"2012-03-27T13:24:36","date_gmt":"2012-03-27T05:24:36","guid":{"rendered":"http:\/\/nick.workao.org\/?p=760"},"modified":"2012-03-27T14:57:24","modified_gmt":"2012-03-27T06:57:24","slug":"ubuntu-linux-%e4%bf%ae%e6%94%b9socket%e6%9c%80%e5%a4%a7%e8%bf%9e%e6%8e%a5%e6%95%b0%ef%bc%8c%e5%90%8c%e6%97%b6%e4%b9%9f%e6%98%af%e6%96%87%e4%bb%b6%e6%9c%80%e5%a4%a7%e6%89%93%e5%bc%80%e6%95%b0","status":"publish","type":"post","link":"https:\/\/nick.txtcc.com\/index.php\/linux\/760","title":{"rendered":"ubuntu linux \u4fee\u6539socket\u6700\u5927\u8fde\u63a5\u6570\uff0c\u540c\u65f6\u4e5f\u662f\u6587\u4ef6\u6700\u5927\u6253\u5f00\u6570"},"content":{"rendered":"<p>\u4fee\u6539\/etc\/security \/limits.conf \u914d\u7f6e\u6587\u4ef6\u3002\n\u4f7f\u7528\u547d\u4ee4\uff1asudo gedit \/etc\/security \/limits.conf\n\u5728\u6587\u4ef6\u4e2d\u589e\u52a0<\/p>\n<ul>\n<li>soft nofile 3000<\/li>\n<li>hard nofile 20000<\/li>\n<li>\u8868\u793a\u8be5\u914d\u7f6e\u5bf9\u6240\u6709\u7528\u6237\u5747\u6709\u6548\nsoft \u8868\u793a \u53ef\u4ee5\u8d85\u8fc7\u540e\u9762\u7684\u914d\u7f6e\u6570\nhard \u8868\u793a \u6700\u5927\u4e0d\u80fd\u8d85\u8fc7\u540e\u9762\u7684\u914d\u7f6e\u6570\nnofile\u8868\u793a \u6211\u4eec\u8fd9\u4e2a\u914d\u7f6e\u662f\u5bf9\u63cf\u8ff0\u7b26\u7684\u914d\u7f6e<\/li>\n<\/ul>\n<p>\u7136\u540e\u91cd\u542f\u4e00\u4e0b\u7cfb\u7edf\uff0c\u7528ulimit -a\u5c31\u53ef\u4ee5\u67e5\u770b\u5230 open files\u7684\u6570\u76ee\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>MySQL\u6700\u5927\u8fde\u63a5\u6570\u7684\u4fee\u6539\uff1a<\/p>\n<p>\u8fdb\u5165MySQL\u5b89\u88c5\u76ee\u5f55 \u6253\u5f00MySQL\u914d\u7f6e\u6587\u4ef6 my.ini \u6216 my.cnf\u67e5\u627e max_connections=100 \u4fee\u6539\u4e3a max_connections=1000 \u670d\u52a1\u91cc\u91cd\u8d77MySQL\u5373\u53ef<\/p>","protected":false},"excerpt":{"rendered":"<p>\u4fee\u6539\/etc\/security \/limits.conf \u914d\u7f6e\u6587\u4ef6\u3002 \u4f7f\u7528\u547d\u4ee4\uff1asudo gedit \/etc\/security \/limits.conf \u5728\u6587\u4ef6\u4e2d\u589e\u52a0 soft nofile 300&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-760","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=760"}],"version-history":[{"count":4,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/760\/revisions"}],"predecessor-version":[{"id":762,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/760\/revisions\/762"}],"wp:attachment":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}