{"action":"opened","issue":{"url":"https://api.github.com/repos/suzuki-shunsuke/nginx.conf/issues/3","repository_url":"https://api.github.com/repos/suzuki-shunsuke/nginx.conf","labels_url":"https://api.github.com/repos/suzuki-shunsuke/nginx.conf/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/suzuki-shunsuke/nginx.conf/issues/3/comments","events_url":"https://api.github.com/repos/suzuki-shunsuke/nginx.conf/issues/3/events","html_url":"https://github.com/suzuki-shunsuke/nginx.conf/issues/3","id":184398812,"number":3,"title":"最大同時接続数","user":{"login":"suzuki-shunsuke","id":13323303,"avatar_url":"https://avatars.githubusercontent.com/u/13323303?v=3","gravatar_id":"","url":"https://api.github.com/users/suzuki-shunsuke","html_url":"https://github.com/suzuki-shunsuke","followers_url":"https://api.github.com/users/suzuki-shunsuke/followers","following_url":"https://api.github.com/users/suzuki-shunsuke/following{/other_user}","gists_url":"https://api.github.com/users/suzuki-shunsuke/gists{/gist_id}","starred_url":"https://api.github.com/users/suzuki-shunsuke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suzuki-shunsuke/subscriptions","organizations_url":"https://api.github.com/users/suzuki-shunsuke/orgs","repos_url":"https://api.github.com/users/suzuki-shunsuke/repos","events_url":"https://api.github.com/users/suzuki-shunsuke/events{/privacy}","received_events_url":"https://api.github.com/users/suzuki-shunsuke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-21T04:50:25Z","updated_at":"2016-10-21T04:50:25Z","closed_at":null,"body":"http://www.atmarkit.co.jp/ait/articles/1407/24/news003_4.html\r\n\r\n最大同時接続数を変更するには「worker_processes」や「worker_connections」を設定する。\r\n最大同時クライアントは「worker_processesの値×worker_connectionsの値」になる。\r\n\r\n```\r\nworker_processes 2;  # CPUのコア数と同じにする\r\npid /run/nginx.pid;\r\nevents {\r\n    worker_connections 1024;  # 1つのworkerプロセスが同時に処理できる最大接続数を指定\r\n    # multi_accept on;\r\n}\r\n```\r\n\r\nCPU数やコア数が分からない場合、\r\n\r\n```\r\n$ cat /proc/cpuinfo\r\n```\r\n\r\nまたは\r\n\r\n```\r\n$ grep processor /proc/cpuinfo | wc -l  # コア数\r\n```\r\n\r\nworker_connectionsにはシステムリソース（プロセス数）の上限値以上の値は指定できない。\r\n使用しているプラットフォームの最大プロセス数は\r\n\r\n```\r\n$ ulimit -n\r\n```"}}
{"actor":{"display_login":"suzuki-shunsuke"}}