{"id":2186,"date":"2018-06-07T23:03:13","date_gmt":"2018-06-07T14:03:13","guid":{"rendered":"https:\/\/pandanote.info\/?p=2186"},"modified":"2022-08-07T00:26:13","modified_gmt":"2022-08-06T15:26:13","slug":"%e6%9c%acweb%e3%82%b5%e3%82%a4%e3%83%88%e3%81%aemariadb%e3%81%8ckernel%e5%85%88%e7%94%9f%e3%81%ab%e5%8b%9d%e6%89%8b%e3%81%abkill%e3%81%95%e3%82%8c%e3%81%a6%e3%81%97%e3%81%be%e3%81%86%e3%82%88%e3%81%86","status":"publish","type":"post","link":"https:\/\/pandanote.info\/?p=2186","title":{"rendered":"\u672cWeb\u30b5\u30a4\u30c8\u306eMariaDB\u304ckernel\u5148\u751f\u306b\u52dd\u624b\u306bkill\u3055\u308c\u3066\u3057\u307e\u3046\u3088\u3046\u306b\u306a\u3063\u3066\u304d\u305f\u306e\u3067\u3001\u300c\u305d\u308d\u305d\u308d\u30b5\u30fc\u30d0\u62e1\u5f35\u304b\u306a?\u300d\u3068\u601d\u3046\u524d\u306b\u3084\u308b\u3079\u304d\u3053\u3068n\u9078"},"content":{"rendered":"<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u672cWeb\u30b5\u30fc\u30d0\u306f1\u53f0(?)\u306e\u30b5\u30fc\u30d0\u306bApache httpd\u3068MariaDB\u304c\u540c\u5c45\u3059\u308b\u3068\u3044\u3046\u6614\u306a\u304c\u3089\u306e\u69cb\u6210\u3067\u3001\u304b\u3064\u305d\u308c\u3092\u4eee\u60f3\u6a5f\u3068\u3057\u3066\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e00\u65b9\u3067Fedora\u306b\u9650\u3089\u305aLinux\u306ekernel\u306fOOM killer\u3068\u3044\u3046\u6a5f\u80fd\u3092\u6301\u3063\u3066\u3044\u3066\u3001\u30d7\u30ed\u30bb\u30b9\u304b\u3089\u8981\u6c42\u3055\u308c\u305f\u30e1\u30e2\u30ea\u304c\u7269\u7406\u7684\u306b\u78ba\u4fdd\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u304f\u308b\u3068\u3001\u30d7\u30ed\u30bb\u30b9\u3053\u3068\u306b\u8a08\u7b97\u3055\u308c\u3066\u3044\u308b\u30b9\u30b3\u30a2\u306b\u57fa\u3065\u3044\u3066\u30d7\u30ed\u30bb\u30b9\u3092\u5f37\u5236\u7684\u306bkill\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>kernel\u304c\u305d\u3046\u3044\u3046\u6a5f\u80fd\u3092\u6301\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u306f\u5927\u91cf\u306b\u30e1\u30e2\u30ea\u3092\u4f7f\u7528\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u304cOOM killer\u306b\u76ee\u3092\u3064\u3051\u3089\u308c\u308b\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u308f\u3051\u3067\u3059\u3002\u4e8b\u5b9f\u3001\u3053\u306e\u8a18\u4e8b\u3092\u6700\u521d\u306b\u66f8\u3044\u3066\u3044\u308b\u76f4\u8fd1\u306e2\u65e5\u9593(2018\/6\/4\u53ca\u30732018\/6\/5)\u9023\u7d9a\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u305a\u3001\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002(\u00b4\u30fb\u03c9\u30fb`)<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u3053\u306e\u8a18\u4e8b\u3067\u306fOOM killer\u306e\u767a\u52d5\u72b6\u6cc1\u3068\u3001\u305d\u306e\u56de\u907f\u7b56\u306b\u3064\u3044\u3066\u66f8\u304d\u307e\u3059\u3002<\/p>\n<h2>OOM killer\u306e\u767a\u52d5\u72b6\u6cc1<\/h2>\n<p>\/var\/log\/messages\u306b\u4ee5\u4e0b\u306e\u30ed\u30b0(\u629c\u7c8b)\u304c\u8a18\u9332\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002MariaDB\u306edaemon(\u30d7\u30ed\u30bb\u30b9\u540d\u306fmysqld)\u304c\u72d9\u308f\u308c\u305f\u3088\u3046\u3067\u3059\u3002(\u00b4\u30fb\u03c9\u30fb`)<\/p>\n<div class=\"code\">Jun  5 23:26:55 pnr kernel: Out of memory: Kill process 1945 (mysqld) score 154 or sacrifice child<br \/>\nJun  6 03:31:55 pnr kernel: Out of memory: Kill process 23979 (mysqld) score 118 or sacrifice child<br \/>\nJun  6 14:15:11 pnr kernel: Out of memory: Kill process 25147 (mysqld) score 124 or sacrifice child<br \/>\nJun  6 14:15:51 pnr kernel: Out of memory: Kill process 27813 (mysqld) score 72 or sacrifice child<\/div>\n<p>&nbsp;<\/p>\n<h2>\u56de\u907f\u7b56<\/h2>\n<h3>\u305d\u306e1:\u4e0d\u8981\u306adaemon\u3092\u8d77\u52d5\u3055\u305b\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u3002<\/h3>\n<p>MariaDB\u306e\u904b\u7528\u3068\u304b\u8a2d\u5b9a\u3068\u304b\u3063\u3066\u3044\u3046\u30ec\u30d9\u30eb\u306e\u8a71\u3067\u306f\u306a\u3044\u3067\u3059\u3051\u3069\u3001\u3053\u308c\u306f\u610f\u5916\u306b\u52b9\u679c\u304c\u3042\u308a\u307e\u3059\u3002\u8d05\u6ca2\u306f\u6575\u3067\u3059\u3002<\/p>\n<p>\u672cWeb\u30b5\u30a4\u30c8\u304c\u7a3c\u50cd\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d0\u3067\u3082\u3001\u4e0d\u8981\u306adaemon\u3092\u7a3c\u50cd\u3055\u305b\u3066\u3044\u305f\u899a\u3048\u306f\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001ps\u30b3\u30de\u30f3\u30c9\u7b49\u3092\u99c6\u4f7f\u3057\u3066\u8abf\u3079\u305f\u7d50\u679c\u3001\u4ee5\u4e0b\u306e\u4e0d\u8981\u306adaemon\u304c\u52d5\u3044\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<ol>\n<li>libvirtd<\/li>\n<li>pptpd<\/li>\n<li>named<\/li>\n<\/ol>\n<p>1\u3064\u76ee\u306elibvirtd\u306f\u4eca\u3069\u304d\u306eLinux\u306a\u3089\u52d5\u3044\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u3053\u3068\u306e\u65b9\u304c\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u30022\u3064\u76ee\u306epptpd\u306f\u81ea\u5b85\u30b5\u30fc\u30d0\u3068\u306e\u9593\u306e\u901a\u4fe1\u7528\u306b\u4f7f\u3063\u3066\u3044\u305f\u3082\u306e\u3067\u3001\u6700\u8fd1<a href=\"https:\/\/pandanote.info\/?p=2024\">OpenVPN\u306b\u7f6e\u304d\u63db\u3048\u305f<\/a>\u305f\u3081\u306b\u4f7f\u308f\u306a\u304f\u306a\u3063\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>3\u3064\u76ee\u306enamed\u306f\u6700\u8fd1\u307e\u3067primary\u306eDNS\u30b5\u30fc\u30d0\u3068\u3057\u3066\u904b\u7528\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u4e0d\u8981\u306b\u306a\u3063\u3066\u3044\u305f\u306e\u3092\u5fd8\u308c\u3066\u3044\u305f\u306e\u3067\u3001\u3053\u306e\u6a5f\u4f1a\u306b\u6b62\u3081\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e0d\u8981\u306adaemon\u304c\u78ba\u8a8d\u3067\u304d\u305f\u3068\u3053\u308d\u3067\u3001root\u6a29\u9650\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3053\u308c\u3089\u306edaemon\u3092\u305f\u3060\u3061\u306b\u505c\u6b62\u3055\u305b\u3001\u304b\u3064\u518d\u8d77\u52d5\u6642\u306b\u3082\u52d5\u4f5c\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<div class=\"code\"># systemctl stop libvirtd<br \/>\n# systemctl disable libvirtd<br \/>\n# systemctl stop pptpd<br \/>\n# systemctl disable pptpd<br \/>\n# systemctl stop named-chroot<br \/>\n# systemctl disable named-chroot<\/div>\n<p>&nbsp;<\/p>\n<h3>\u305d\u306e2:MariaDB\u306e\u8a2d\u5b9a\u3092\u8abf\u6574\u3059\u308b\u3002<\/h3>\n<p>\u6b21\u306b\u3001MariaDB\u306e\u8a2d\u5b9a\u3092\u8abf\u6574\u3057\u307e\u3059\u3002\u307e\u305a\u3001\/etc\/my.cnf.d\/mariadb-server.cnf\u306e[mysqld]\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<div class=\"code\">query_cache_type=1<br \/>\nquery_cache_limit=4M<br \/>\nquery_cache_size=32M<\/div>\n<p>&nbsp;<br \/>\n\u4e0a\u8a18\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3053\u3068\u306b\u3088\u308a\u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6709\u52b9\u306b\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u901f\u304f\u3057\u3066\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u304c\u30af\u30a8\u30ea\u3092\u62b1\u3048\u8fbc\u3080\u6642\u9593\u3092\u5c11\u3057\u3067\u3082\u6e1b\u3089\u305d\u3046\u3068\u3044\u3046\u76ee\u8ad6\u898b\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306f\u30b9\u30ed\u30fc\u30af\u30a8\u30ea\u306e\u691c\u51fa\u306b\u4fc2\u308b\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306fWordpress\u306e\u6027\u80fd\u3092\u4fe1\u3058\u3066\u884c\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>[2018\/7\/17\u8ffd\u8a18] query_cache_size\u306e\u5927\u304d\u3055\u306f\u5f53\u521d\u306f16M\u3067\u3057\u305f\u304c\u300132M\u306b\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3>\u305d\u306e3:\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u306b\u73fe\u5728\u306e\u72b6\u6cc1\u306e\u8aac\u660e\u6587\u3068\u5e83\u544a\u3092\u5165\u308c\u308b\u3002<\/h3>\n<p>\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u3067\u3082\u73fe\u5728\u306e\u72b6\u6cc1\u3092\u6b63\u76f4\u306b\u8aac\u660e\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<blockquote><p>2018\u5e746\u67085,6\u65e5\u30682\u65e5\u9023\u7d9a\u3067OOM killer\u306bMariaDB\u306edaemon\u304ckill\u3055\u308c\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u3053\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u518d\u5ea6\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u6642\u306b\u306fMariaDB\u306edaemon\u304ckill\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p><\/blockquote>\n<p>\u7684\u306a\u6587\u8a00\u3092\u8ffd\u52a0\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u300c\u4e2d\u306e\u4eba\u304c\u5fa9\u65e7\u306b\u5411\u3051\u3066\u9811\u5f35\u3063\u3066\u3044\u308b\u300d\u611f\u3092\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001Amazon\u306e\u30d0\u30ca\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3069\u306e\u30d0\u30ca\u30fc\u304c\u51fa\u308b\u306e\u304b\u306b\u3064\u3044\u3066\u306f\u6b21\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u3068\u304d\u306e\u304a\u697d\u3057\u307f\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306e$n$\u9078\u30b7\u30ea\u30fc\u30ba\u306f$n = 3$\u306e\u5834\u5408\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u4eca\u56deWordpress\u306e\u6027\u80fd\u3092\u4fe1\u3058\u3066\u8a2d\u5b9a\u3092\u884c\u308f\u306a\u304b\u3063\u305f\u30b9\u30ed\u30fc\u30af\u30a8\u30ea\u306e\u691c\u51fa\u306b\u4fc2\u308b\u8a2d\u5b9a\u3067\u3059\u304c\u3001\u3082\u3046\u5c11\u3057\u843d\u3061\u7740\u3044\u305f\u3068\u3053\u308d\u3067\u518d\u5ea6\u8a66\u3057\u3066\u307f\u308b\u4e88\u5b9a\u3067\u3059\u3002\u307e\u305f\u3001\u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u8a2d\u5b9a\u3082\u5f53\u9762\u306e\u9593\u4e0a\u8a18\u306e\u8a2d\u5b9a\u3067\u69d8\u5b50\u3092\u898b\u3066\u3044\u304d\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u306f\u4ee5\u4e0a\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u672cWeb\u30b5\u30fc\u30d0\u306f1\u53f0(?)\u306e\u30b5\u30fc\u30d0\u306bApache httpd\u3068MariaDB\u304c\u540c\u5c45\u3059\u308b\u3068\u3044\u3046\u6614\u306a\u304c\u3089\u306e\u69cb\u6210\u3067\u3001\u304b\u3064\u305d\u308c\u3092\u4eee\u60f3\u6a5f\u3068\u3057\u3066\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u4e00\u65b9\u3067Fedora\u306b\u9650\u3089\u305aLinux\u306ekernel\u306fOOM killer\u3068\u3044\u3046\u6a5f\u80fd\u3092\u6301\u3063\u3066\u3044\u3066\u3001\u30d7\u30ed\u30bb\u30b9\u304b\u3089\u8981\u6c42\u3055\u308c\u305f\u30e1\u30e2\u30ea\u304c\u7269\u7406\u7684\u306b\u78ba\u4fdd\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u304f\u308b\u3068\u3001\u30d7\u30ed\u30bb\u30b9\u3053\u3068\u306b\u8a08\u7b97\u3055\u308c\u3066\u3044\u308b\u30b9\u30b3\u30a2\u306b\u57fa\u3065\u3044\u3066\u30d7\u30ed\u30bb\u30b9\u3092\u5f37\u5236\u7684\u306bkill\u3057\u3066\u3057\u307e\u3044\u2026 <span class=\"read-more\"><a href=\"https:\/\/pandanote.info\/?p=2186\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":8629,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,16,15,3],"tags":[],"class_list":["post-2186","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fedora","category-n","category-pc","category-website-2"],"_links":{"self":[{"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/posts\/2186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pandanote.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2186"}],"version-history":[{"count":18,"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/posts\/2186\/revisions"}],"predecessor-version":[{"id":9341,"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/posts\/2186\/revisions\/9341"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/media\/8629"}],"wp:attachment":[{"href":"https:\/\/pandanote.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandanote.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandanote.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}