{"id":1362,"date":"2026-11-01T21:39:08","date_gmt":"2026-11-01T13:39:08","guid":{"rendered":"https:\/\/www.asaeo.com\/?p=1362"},"modified":"2026-11-01T21:39:08","modified_gmt":"2026-11-01T13:39:08","slug":"mysql%e6%8a%a5too-many-connections%e6%80%8e%e4%b9%88%e5%8a%9e%ef%bc%9f%e5%85%88%e6%9f%a5%e8%bf%9e%e6%8e%a5%e6%b1%a0%e5%92%8c%e7%a9%ba%e9%97%b2%e8%bf%9e%e6%8e%a5","status":"publish","type":"post","link":"https:\/\/www.asaeo.com\/?p=1362","title":{"rendered":"MySQL\u62a5Too many connections\u600e\u4e48\u529e\uff1f\u5148\u67e5\u8fde\u63a5\u6c60\u548c\u7a7a\u95f2\u8fde\u63a5"},"content":{"rendered":"<div class=\"yd-practical-guide\" style=\"font-size:16px;line-height:1.9\">\n<p>\u7f51\u7ad9\u4e00\u5230\u9ad8\u5cf0\u5c31\u62a5 <code>Too many connections<\/code>\uff0c\u628a\u8fde\u63a5\u4e0a\u9650\u8c03\u5927\u540e\u6682\u65f6\u6062\u590d\uff0c\u8fc7\u51e0\u5929\u53c8\u51fa\u95ee\u9898\u3002\u8fd9\u79cd\u60c5\u51b5\u5148\u8981\u5206\u6e05\uff1a\u6b63\u5e38\u4e1a\u52a1\u771f\u7684\u9700\u8981\u66f4\u591a\u5e76\u53d1\uff0c\u8fd8\u662f\u8fde\u63a5\u6c60\u3001\u6162\u67e5\u8be2\u6216\u672a\u7ed3\u675f\u7684\u4e8b\u52a1\u628a\u8fde\u63a5\u5360\u4f4f\u4e86\u3002\u4e0a\u9650\u53ea\u51b3\u5b9a\u80fd\u8fdb\u591a\u5c11\u8fde\u63a5\uff0c\u4e0d\u4f1a\u66ff\u6570\u636e\u5e93\u5b8c\u6210\u66f4\u591a\u5de5\u4f5c\u3002<\/p>\n<p>\u672c\u6587\u6309 MySQL 8.4 \u5b98\u65b9\u6587\u6863\u6574\u7406\uff0c\u6838\u9a8c\u65e5\u671f\u4e3a2026\u5e7411\u67081\u65e5\u3002\u4ee5\u4e0b\u547d\u4ee4\u7528\u4e8e\u6392\u67e5\uff0c\u6570\u5b57\u4e3a\u89e3\u91ca\u7528\u793a\u4f8b\uff0c\u4e0d\u662f\u672c\u7ad9\u670d\u52a1\u5668\u7684\u6545\u969c\u8bb0\u5f55\uff1b\u6258\u7ba1\u6570\u636e\u5e93\u7684\u6743\u9650\u4e0e\u53c2\u6570\u8c03\u6574\u65b9\u5f0f\u4ee5\u5176\u63a7\u5236\u53f0\u4e3a\u51c6\u3002<\/p>\n<h2 style=\"font-size:21px;line-height:1.5;margin:32px 0 14px;font-weight:600\">1. \u5148\u786e\u8ba4\u62a5\u9519\u6765\u81ea\u54ea\u4e00\u4e2a\u6570\u636e\u5e93\u5b9e\u4f8b<\/h2>\n<p>\u4fdd\u7559\u5b8c\u6574\u62a5\u9519\u3001\u53d1\u751f\u65f6\u95f4\u548c\u5e94\u7528\u540d\u79f0\uff0c\u6838\u5bf9\u5e94\u7528\u5b9e\u9645\u8fde\u63a5\u7684\u4e3b\u673a\u3001\u7aef\u53e3\u4e0e\u6570\u636e\u5e93\u4ee3\u7406\u3002\u751f\u4ea7\u5e93\u3001\u53ea\u8bfb\u5e93\u3001\u6d4b\u8bd5\u5e93\u53ef\u80fd\u4f7f\u7528\u4e0d\u540c\u5730\u5740\u3002\u8fde\u63a5\u6c60\u81ea\u5df1\u7684\u201c\u83b7\u53d6\u8fde\u63a5\u8d85\u65f6\u201d\uff0c\u4e0e MySQL \u8fd4\u56de\u7684\u8fde\u63a5\u6570\u8fbe\u5230\u4e0a\u9650\uff0c\u4e5f\u4e0d\u80fd\u53ea\u51ed\u9875\u9762\u63d0\u793a\u5f53\u4f5c\u540c\u4e00\u95ee\u9898\u3002<\/p>\n<p>\u8fde\u63a5\u5df2\u7ecf\u8017\u5c3d\u65f6\uff0c\u666e\u901a\u8d26\u53f7\u53ef\u80fd\u8fdb\u4e0d\u53bb\u3002MySQL\u4e3a\u5177\u6709 <code>CONNECTION_ADMIN<\/code> \u6743\u9650\u7684\u7ba1\u7406\u8d26\u53f7\u4fdd\u7559\u989d\u5916\u8fde\u63a5\uff0c\u8fd9\u662f\u7ed9\u7ba1\u7406\u5458\u8bca\u65ad\u7528\u7684\uff0c\u4e0d\u8981\u7ed9\u4e1a\u52a1\u8d26\u53f7\u52a0\u9ad8\u6743\u9650\u6765\u7ed5\u5f00\u95ee\u9898\u3002\u6ca1\u6709\u7ba1\u7406\u6743\u9650\u65f6\uff0c\u628a\u65f6\u95f4\u548c\u9519\u8bef\u7801\u4ea4\u7ed9\u6570\u636e\u5e93\u7ba1\u7406\u5458\uff0c\u907f\u514d\u811a\u672c\u4e0d\u65ad\u91cd\u8fde\u3002<\/p>\n<figure style=\"margin:26px 0\"><a href=\"https:\/\/www.asaeo.com\/wp-content\/uploads\/2026\/11\/yd3-mysql-connections-20261101.jpg\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"1280\" height=\"320\" class=\"aligncenter size-full wp-image-1346\" src=\"https:\/\/www.asaeo.com\/wp-content\/uploads\/2026\/11\/yd3-mysql-connections-20261101.jpg\" alt=\"MySQL\u5b98\u65b9\u6587\u6863\u8bf4\u660eToo many connections\u4e0emax_connections\" loading=\"lazy\" style=\"display:block;width:100%;height:auto;border:1px solid #e5eaf2;border-radius:8px\" srcset=\"https:\/\/www.asaeo.com\/wp-content\/uploads\/2026\/11\/yd3-mysql-connections-20261101.jpg 1280w, https:\/\/www.asaeo.com\/wp-content\/uploads\/2026\/11\/yd3-mysql-connections-20261101-300x75.jpg 300w, https:\/\/www.asaeo.com\/wp-content\/uploads\/2026\/11\/yd3-mysql-connections-20261101-1024x256.jpg 1024w, https:\/\/www.asaeo.com\/wp-content\/uploads\/2026\/11\/yd3-mysql-connections-20261101-768x192.jpg 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><figcaption style=\"font-size:13px;line-height:1.7;color:#67758a;margin-top:9px\">MySQL 8.4\u5b98\u65b9\u6587\u6863\u771f\u5b9e\u622a\u56fe\uff1a\u8fde\u63a5\u8017\u5c3d\u3001\u8fde\u63a5\u4e0a\u9650\u4e0e\u7ba1\u7406\u5458\u4fdd\u7559\u8fde\u63a5\u3002 <a href=\"https:\/\/www.asaeo.com\/wp-content\/uploads\/2026\/11\/yd3-mysql-connections-20261101.jpg\" target=\"_blank\" rel=\"noopener\">\u67e5\u770b\u622a\u56fe<\/a> \u00b7 <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/too-many-connections.html\" target=\"_blank\" rel=\"noopener\">\u5b98\u65b9\u539f\u6587<\/a><\/figcaption><\/figure>\n<h2 style=\"font-size:21px;line-height:1.5;margin:32px 0 14px;font-weight:600\">2. \u5728\u540c\u4e00\u4e2a\u5b9e\u4f8b\u91cc\u7559\u4e00\u7ec4\u73b0\u573a\u6570\u636e<\/h2>\n<p>\u901a\u8fc7\u5df2\u6709\u7684\u5b89\u5168\u767b\u5f55\u65b9\u5f0f\u8fdb\u5165 MySQL \u5ba2\u6237\u7aef\uff0c\u518d\u6267\u884c\u4e0b\u9762\u7684\u53ea\u8bfb\u8bed\u53e5\u3002\u4e0d\u8981\u628a\u6570\u636e\u5e93\u5bc6\u7801\u76f4\u63a5\u5199\u8fdb\u547d\u4ee4\u884c\u6216\u53d1\u5230\u5de5\u5355\u91cc\u3002\u67e5\u8be2\u5168\u5c40\u72b6\u6001\u3001\u67e5\u770b\u5176\u4ed6\u8d26\u53f7\u7684\u8fde\u63a5\u53ef\u80fd\u9700\u8981\u7ba1\u7406\u6743\u9650\uff1b\u6743\u9650\u4e0d\u8db3\u53ea\u4ee3\u8868\u770b\u4e0d\u5168\u3002<\/p>\n<pre style=\"padding:18px;background:#f4f7fb;border:1px solid #e0e7f0;border-radius:8px;font-size:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere\"><code>SELECT NOW(), @@hostname, @@port, VERSION();\r\nSHOW GLOBAL VARIABLES\r\nWHERE Variable_name IN ('max_connections', 'wait_timeout', 'interactive_timeout');\r\nSHOW GLOBAL STATUS\r\nWHERE Variable_name IN ('Threads_connected', 'Threads_running',\r\n  'Max_used_connections', 'Connection_errors_max_connections', 'Uptime');<\/code><\/pre>\n<table style=\"width:100%;border-collapse:collapse;font-size:14px;margin:20px 0\">\n<thead>\n<tr>\n<th style=\"padding:12px;border:1px solid #dce4ef;text-align:left;background:#f2f6fc\">\u6307\u6807<\/th>\n<th style=\"padding:12px;border:1px solid #dce4ef;text-align:left;background:#f2f6fc\">\u8be5\u600e\u4e48\u770b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">Threads_connected<\/td>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u5f53\u524d\u6253\u5f00\u7684\u8fde\u63a5\u6570\uff0c\u7a7a\u95f2\u8fde\u63a5\u4e5f\u4f1a\u5360\u7528\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">Threads_running<\/td>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u5f53\u524d\u975e\u4f11\u7720\u7ebf\u7a0b\u6570\uff1b\u4e0d\u80fd\u76f4\u63a5\u7b49\u540c\u6b63\u5728\u6d88\u8017CPU\u7684\u67e5\u8be2\u6570\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">Max_used_connections<\/td>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u5386\u53f2\u540c\u65f6\u8fde\u63a5\u5cf0\u503c\uff0c\u4e0d\u80fd\u5f53\u4f5c\u6b64\u523b\u7684\u8fde\u63a5\u6570\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">Connection_errors_max_connections<\/td>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u56e0\u89e6\u53ca\u8fde\u63a5\u4e0a\u9650\u88ab\u62d2\u7edd\u7684\u6b21\u6570\uff1b\u6bd4\u8f83\u4e24\u6b21\u91c7\u6837\u662f\u5426\u7ee7\u7eed\u589e\u52a0\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">Uptime<\/td>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u6838\u5bf9\u4e24\u6b21\u91c7\u6837\u4e4b\u95f4\u662f\u5426\u91cd\u542f\uff0c\u907f\u514d\u628a\u4e0d\u540c\u8fd0\u884c\u5468\u671f\u7684\u8ba1\u6570\u76f4\u63a5\u76f8\u51cf\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6545\u969c\u65f6\u3001\u4e1a\u52a1\u6062\u590d\u540e\u5404\u7559\u4e00\u7ec4\uff0c\u6bd4\u53ea\u770b\u4e00\u5f20\u622a\u56fe\u66f4\u6709\u7528\u3002\u4f8b\u5982\u62a5\u9519\u540e\u8fde\u63a5\u6570\u5df2\u7ecf\u56de\u843d\uff0c\u5e76\u4e0d\u80fd\u8bc1\u660e\u4e4b\u524d\u6ca1\u6709\u77ed\u65f6\u5cf0\u503c\u3002\u4e5f\u4e0d\u8981\u4e3a\u4e86\u201c\u91cd\u65b0\u8ba1\u6570\u201d\u6267\u884c\u6e05\u72b6\u6001\u6216\u91cd\u542f\uff0c\u73b0\u573a\u4f1a\u56e0\u6b64\u4e22\u5931\u3002<\/p>\n<h2 style=\"font-size:21px;line-height:1.5;margin:32px 0 14px;font-weight:600\">3. \u770b\u662f\u8c01\u5360\u7740\u8fde\u63a5\uff0cSleep\u4e0d\u7b49\u4e8e\u53ef\u4ee5\u968f\u624b\u6e05\u7406<\/h2>\n<pre style=\"padding:18px;background:#f4f7fb;border:1px solid #e0e7f0;border-radius:8px;font-size:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere\"><code>SHOW FULL PROCESSLIST;<\/code><\/pre>\n<p>\u6709 <code>PROCESS<\/code> \u6743\u9650\u624d\u80fd\u770b\u5230\u5176\u4ed6\u7528\u6237\u7684\u8fde\u63a5\u3002\u91cd\u70b9\u770b <code>User<\/code>\u3001<code>Host<\/code>\u3001<code>Command<\/code>\u3001<code>Time<\/code>\u3001<code>State<\/code> \u548c <code>Info<\/code>\uff1a\u8fde\u63a5\u6765\u81ea\u54ea\u53f0\u5e94\u7528\u670d\u52a1\u5668\uff0c\u662f\u96c6\u4e2d\u5728\u540c\u4e00\u4e2a\u4e1a\u52a1\u8d26\u53f7\uff0c\u8fd8\u662f\u591a\u4e2a\u540e\u53f0\u4efb\u52a1\u4e00\u8d77\u8fd0\u884c\uff1b\u957f\u65f6\u95f4\u67e5\u8be2\u662f\u5728\u6267\u884c\uff0c\u8fd8\u662f\u7b49\u5f85\u9501\u3002<\/p>\n<p><code>Sleep<\/code> \u53ea\u8868\u793a\u4f1a\u8bdd\u5f53\u524d\u7a7a\u95f2\u3002\u8fde\u63a5\u6c60\u9884\u7559\u7684\u7a7a\u95f2\u8fde\u63a5\u53ef\u80fd\u5b8c\u5168\u6b63\u5e38\uff1b\u4e5f\u53ef\u80fd\u5b58\u5728\u8fde\u63a5\u672a\u5f52\u8fd8\u3001\u6c60\u8fc7\u5927\uff0c\u751a\u81f3\u4e8b\u52a1\u672a\u7ed3\u675f\u7684\u60c5\u51b5\u3002\u4ec5\u51ed Sleep \u6570\u91cf\u6216\u505c\u7559\u79d2\u6570\u65e0\u6cd5\u786e\u5b9a\u662f\u54ea\u4e00\u79cd\u3002\u6d89\u53ca\u957f\u4e8b\u52a1\u65f6\uff0c\u8ba9\u7ba1\u7406\u5458\u7ed3\u5408 InnoDB\u4e8b\u52a1\u4e0e\u9501\u4fe1\u606f\u68c0\u67e5\u3002\u6279\u91cf\u6740\u8fde\u63a5\u53ef\u80fd\u6253\u65ad\u4e1a\u52a1\u5e76\u89e6\u53d1\u91cd\u8fde\uff0c\u4e0d\u80fd\u5f53\u4f5c\u56fa\u5b9a\u6e05\u7406\u4efb\u52a1\u3002<\/p>\n<p>\u5b8c\u6574\u8fdb\u7a0b\u5217\u8868\u53ef\u80fd\u5e26\u4e1a\u52a1SQL\u3001\u8d26\u53f7\u3001\u5185\u90e8\u5730\u5740\u548c\u6570\u636e\u3002\u4ea4\u7ed9\u4ed6\u4eba\u6392\u67e5\u524d\u5148\u8131\u654f\uff0c\u4e0d\u8981\u76f4\u63a5\u516c\u5f00\u622a\u56fe\u3002<\/p>\n<h2 style=\"font-size:21px;line-height:1.5;margin:32px 0 14px;font-weight:600\">4. \u8fde\u63a5\u6c60\u8981\u6309\u5168\u90e8\u5b9e\u4f8b\u52a0\u603b<\/h2>\n<p>\u5e38\u89c1\u76f2\u533a\u662f\u201c\u6bcf\u4e2a\u8fdb\u7a0b\u6700\u591a10\u4e2a\u8fde\u63a5\uff0c\u770b\u8d77\u6765\u4e0d\u591a\u201d\uff0c\u5374\u5ffd\u7565\u540c\u4e00\u670d\u52a1\u542f\u52a8\u4e86\u591a\u4e2a\u8fdb\u7a0b\u3001\u591a\u53f0\u526f\u672c\uff0c\u8fd8\u6709\u961f\u5217\u3001\u5b9a\u65f6\u4efb\u52a1\u548c\u540e\u53f0\u7ba1\u7406\u3002\u9884\u7b97\u53ef\u6309\u201c\u5404\u7c7b\u8fdb\u7a0b\u6570\u91cf \u00d7 \u6bcf\u4e2a\u8fdb\u7a0b\u7684\u8fde\u63a5\u6c60\u4e0a\u9650\u201d\u9010\u9879\u76f8\u52a0\uff0c\u518d\u7ed9\u7ba1\u7406\u3001\u76d1\u63a7\u548c\u5176\u4ed6\u4e1a\u52a1\u7559\u4f59\u91cf\u3002<\/p>\n<p>\u4e3e\u4f8b\uff1a4\u4e2a\u5e94\u7528\u526f\u672c\uff0c\u6bcf\u4e2a\u526f\u672c5\u4e2a\u72ec\u7acb\u8fdb\u7a0b\uff0c\u6bcf\u8fdb\u7a0b\u7684\u6c60\u4e0a\u965010\u4e2a\uff0c\u7406\u8bba\u4e0a\u5c31\u53ef\u80fd\u5360200\u4e2a\u8fde\u63a5\u3002\u8fd9\u4e2a\u6570\u662f\u9884\u7b97\u4e0a\u9650\uff0c\u4e0d\u8868\u793a\u4e00\u5b9a\u5168\u90e8\u540c\u65f6\u5efa\u7acb\uff1b\u8fde\u63a5\u6c60\u7684\u6700\u5c0f\u7a7a\u95f2\u6570\u3001\u6309\u9700\u5efa\u7acb\u65b9\u5f0f\u548c\u90e8\u7f72\u671f\u95f4\u65b0\u65e7\u526f\u672c\u5e76\u5b58\uff0c\u90fd\u8981\u4e00\u8d77\u6838\u5bf9\u3002<\/p>\n<table style=\"width:100%;border-collapse:collapse;font-size:14px;margin:20px 0\">\n<thead>\n<tr>\n<th style=\"padding:12px;border:1px solid #dce4ef;text-align:left;background:#f2f6fc\">\u73b0\u573a\u8868\u73b0<\/th>\n<th style=\"padding:12px;border:1px solid #dce4ef;text-align:left;background:#f2f6fc\">\u4f18\u5148\u6838\u5bf9<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u8fde\u63a5\u591a\uff0c\u4e3b\u8981\u662fSleep\uff0c\u6570\u636e\u5e93\u8d1f\u8f7d\u4e0d\u9ad8<\/td>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u8fde\u63a5\u6c60\u603b\u9884\u7b97\u3001\u6700\u5c0f\u7a7a\u95f2\u6570\u3001\u8fde\u63a5\u5f52\u8fd8\u4e0e\u56de\u6536\u8bbe\u7f6e\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u6d3b\u8dc3\u8fde\u63a5\u4e5f\u9ad8\uff0c\u67e5\u8be2\u8d8a\u6765\u8d8a\u6162<\/td>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u6162\u67e5\u8be2\u3001\u9501\u7b49\u5f85\u3001CPU\u4e0e\u78c1\u76d8\u538b\u529b\uff0c\u9632\u6b62\u6392\u961f\u7ee7\u7eed\u653e\u5927\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u6bcf\u6b21\u6269\u5bb9\u6216\u53d1\u5e03\u540e\u51fa\u9519<\/td>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u526f\u672c\u6570\u3001\u8fdb\u7a0b\u6570\u4e0e\u6eda\u52a8\u53d1\u5e03\u65f6\u7684\u8fde\u63a5\u53e0\u52a0\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u56fa\u5b9a\u65f6\u95f4\u7a81\u7136\u89e6\u9876<\/td>\n<td style=\"padding:12px;border:1px solid #dce4ef;text-align:left;vertical-align:top\">\u62a5\u8868\u3001\u5907\u4efd\u3001\u6279\u5904\u7406\u4efb\u52a1\u662f\u5426\u540c\u65f6\u542f\u52a8\uff0c\u4ee5\u53ca\u5e94\u7528\u662f\u5426\u5bc6\u96c6\u91cd\u8bd5\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"font-size:21px;line-height:1.5;margin:32px 0 14px;font-weight:600\">5. \u8c03\u5927\u8fde\u63a5\u4e0a\u9650\uff0c\u8981\u6709\u5bb9\u91cf\u4f9d\u636e<\/h2>\n<p>\u786e\u8ba4\u8fde\u63a5\u91ca\u653e\u6b63\u5e38\u3001\u67e5\u8be2\u4e0e\u9501\u7b49\u5f85\u5df2\u7ecf\u6392\u9664\uff0c\u4e14\u5cf0\u503c\u786e\u5b9e\u6765\u81ea\u5fc5\u8981\u4e1a\u52a1\u540e\uff0c\u624d\u8bc4\u4f30\u589e\u5927 <code>max_connections<\/code>\u3002\u540c\u65f6\u68c0\u67e5\u5185\u5b58\u3001CPU\u3001\u6587\u4ef6\u63cf\u8ff0\u7b26\u53ca\u6570\u636e\u5e93\u670d\u52a1\u672c\u8eab\u7684\u9650\u5236\u3002\u6bcf\u4e2a\u8fde\u63a5\u53ca\u5176\u67e5\u8be2\u53ef\u80fd\u6d88\u8017\u5185\u5b58\uff0c\u80fd\u63a5\u8fdb\u6765\u4e0d\u7b49\u4e8e\u80fd\u591f\u7a33\u5b9a\u5b8c\u6210\u8bf7\u6c42\u3002<\/p>\n<p>\u4e5f\u522b\u628a <code>wait_timeout<\/code> \u7edf\u4e00\u6539\u5f97\u6781\u77ed\u6765\u8d76\u8d70\u7a7a\u95f2\u8fde\u63a5\u3002\u8fde\u63a5\u6c60\u5982\u679c\u8fd8\u590d\u7528\u5df2\u5931\u6548\u8fde\u63a5\uff0c\u5e94\u7528\u53ef\u80fd\u8f6c\u800c\u51fa\u73b0\u65ad\u8fde\u548c\u91cd\u8bd5\u3002\u5e94\u628a\u670d\u52a1\u7aef\u7a7a\u95f2\u8d85\u65f6\u4e0e\u8fde\u63a5\u6c60\u56de\u6536\u3001\u5b58\u6d3b\u68c0\u67e5\u914d\u5408\u8d77\u6765\uff0c\u5e76\u5728\u6d4b\u8bd5\u73af\u5883\u9a8c\u8bc1\u3002<\/p>\n<h2 style=\"font-size:21px;line-height:1.5;margin:32px 0 14px;font-weight:600\">6. \u4fee\u5b8c\u4ee5\u540e\uff0c\u4ee5\u4e1a\u52a1\u6062\u590d\u4e3a\u51c6<\/h2>\n<p>\u5728\u53ef\u6bd4\u4e1a\u52a1\u65f6\u6bb5\u590d\u67e5\uff1a\u8fde\u63a5\u62d2\u7edd\u8ba1\u6570\u662f\u5426\u7ee7\u7eed\u589e\u52a0\uff0c\u8fde\u63a5\u662f\u5426\u80fd\u56de\u843d\uff0c\u83b7\u53d6\u8fde\u63a5\u8017\u65f6\u548c\u8bf7\u6c42\u5931\u8d25\u7387\u662f\u5426\u6539\u5584\uff0c\u6570\u636e\u5e93\u5185\u5b58\u3001\u6d3b\u8dc3\u7ebf\u7a0b\u53ca\u67e5\u8be2\u8017\u65f6\u662f\u5426\u7a33\u5b9a\u3002\u82e5\u53ea\u63d0\u9ad8\u4e0a\u9650\uff0c\u5374\u8ba9\u66f4\u591a\u8bf7\u6c42\u5835\u5728\u6570\u636e\u5e93\u91cc\uff0c\u8fd9\u6b21\u8c03\u6574\u5c31\u6ca1\u6709\u89e3\u51b3\u95ee\u9898\u3002\u4e0b\u4e00\u6b65\u8be5\u6539\u54ea\u4e00\u5c42\uff0c\u5e94\u7531\u8fd9\u7ec4\u6570\u636e\u51b3\u5b9a\u3002<\/p>\n<p>\u6838\u9a8c\u6765\u6e90\uff1a<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/too-many-connections.html\" target=\"_blank\" rel=\"noopener\">\u8fde\u63a5\u8017\u5c3d\u4e0e\u7ba1\u7406\u5458\u8fde\u63a5<\/a>\u3001<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/server-status-variables.html\" target=\"_blank\" rel=\"noopener\">\u72b6\u6001\u53d8\u91cf<\/a>\u3001<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/show-processlist.html\" target=\"_blank\" rel=\"noopener\">\u8fdb\u7a0b\u5217\u8868\u4e0e\u6743\u9650<\/a>\u3001<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/server-system-variables.html\" target=\"_blank\" rel=\"noopener\">\u7cfb\u7edf\u53d8\u91cf<\/a>\u3001<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/memory-use.html\" target=\"_blank\" rel=\"noopener\">MySQL\u5185\u5b58\u4f7f\u7528<\/a>\u3001<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/innodb-information-schema-examples.html\" target=\"_blank\" rel=\"noopener\">\u4e8b\u52a1\u548c\u9501\u6392\u67e5<\/a>\u3002<\/p>\n<h2 style=\"font-size:21px;line-height:1.5;margin:32px 0 14px;font-weight:600\">\u7ee7\u7eed\u6392\u67e5<\/h2>\n<ul>\n<li><a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/www.asaeo.com\/?p=1334\">\u5148\u786e\u8ba4\u5185\u5b58\u548cOOM\u60c5\u51b5<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8fde\u63a5\u6570\u7528\u6ee1\u4e0d\u4e00\u5b9a\u662f\u6570\u636e\u5e93\u914d\u7f6e\u592a\u5c0f\u3002\u7528\u5168\u5c40\u72b6\u6001\u4e0e\u8fdb\u7a0b\u5217\u8868\uff0c\u533a\u5206\u8fde\u63a5\u6c60\u53e0\u52a0\u3001\u6162\u67e5\u8be2\u3001\u9501\u7b49\u5f85\u548c\u77ed\u65f6\u5cf0\u503c\uff0c\u518d\u5224\u65ad\u662f\u5426\u9700\u8981\u63d0\u9ad8\u4e0a\u9650\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[235],"tags":[273,242],"class_list":["post-1362","post","type-post","status-publish","format-standard","hentry","category-235","tag-mysql","tag-242"],"_links":{"self":[{"href":"https:\/\/www.asaeo.com\/index.php?rest_route=\/wp\/v2\/posts\/1362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asaeo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asaeo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asaeo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asaeo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1362"}],"version-history":[{"count":1,"href":"https:\/\/www.asaeo.com\/index.php?rest_route=\/wp\/v2\/posts\/1362\/revisions"}],"predecessor-version":[{"id":1363,"href":"https:\/\/www.asaeo.com\/index.php?rest_route=\/wp\/v2\/posts\/1362\/revisions\/1363"}],"wp:attachment":[{"href":"https:\/\/www.asaeo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asaeo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asaeo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}