付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、2019/5/25APP S TO:PUR ESCOPEDETAILSmax_connectionsmax_connections1/4 SHOW GLOBAL VARIABLES LIKE max_connections;+-+-+| Variable_name | Value |+-+-+| max_connections | 200 |+-+-+1 row in set (0.00 sec) SELECT * FROM information_schema.GLOBAL_VARIABLES WHERE VARIABLE_NAME = max_connections;+-+-+| VARI
2、ABLE_NAME | VARIABLE_VALUE |+-+-+| MAX_CONNECTIONS | 200|+-+-+1 row in set (0.00 sec)SUPER2019/5/25Theum er of allowed connections can be changed either using a restart setting the max_connectionsoption heconguration le:or dynamically like:The max_connections option is relat able_open_cache and open
3、_ s_limit, and may adjustmax connections downwards when number of le descriptors available.is started, if it is estimated t the value is too large compared to theIf no more connections are available, the following error is returned when connection attempts are made:See also:Error: 1040, Too many con
4、nections m I getting a message g t there are too many connections when logging o ? Server: What is theum Value for max_connections on Linux?Connection_errors_max_connectionsMySQL 5.6 and later, you can use the Connecti ors max connections global s us variable to see how many times connection attempt
5、s have failed due to theum number of connections being reached:Max_used_connectionsThe global s us vMax used connections can be used to determine theum number of concurrentconnections sincewas last restarted:2/4 SHOW GLOBAL S US LIKE Max_used_connections;+-+-+| Variable_name| Value |+-+-+| Max_used_
6、connections | 102 |+-+-+1 row in set (0.00 sec) SELECT * FROM information_schema.GLOBAL_S US WHERE VARIABLE_NAME = Max_used_connections;+-+-+| VARIABLE_NAME| VARIABLE_VALUE | SHOW GLOBAL S US LIKE Connection_errors_max_connections;+-+-+| Variable_name| Value |+-+-+| Connection_errors_max_connections
7、 | 10 |+-+-+1 row in set (0.00 sec) SELECT * FROM information_schema.GLOBAL_S US WHERE VARIABLE_NAME = Connection_errors_max_con+-+-+| VARIABLE_NAME| VARIABLE_VALUE |+-+-+| CONNECTION_ERRORS_MAX_CONNECTIONS | 10|+-+-+1 row in set (0.00 sec)ERROR 1040 (HY000): Too many connectionsFor this reason grea
8、t care should o be taken if max_connections is in eased without restarting: running out of le descriptors can for ex le cause updates not to be logged he binary log. SET GLOBAL max_connections = 100; dm nnections = 200The Information Schema table GLOBAL_VARIABLES is available ySQL 5.1 and later.2019
9、/5/25If this gets close to max_connections it is a sign t you either need to increase max_connections or make sure t connections disconnect quicker.Threads_connectedThreads connected is the number of current connections and can be found as:See also: um Connection Limit Nearing Or ReachedThreads_runn
10、ingThreads_running is the number of non-idle threads. The current number of running threads can be found as:If the number of running eads is high, you may experien contention i es. threads is to make sure t each query is as eective as sible.ay to reduce the number of runningREFERENNOTE:1023341.1 - E
11、rror: 1040, Too many connectionsNOTE:1023582.1 - NOTE:1024093.1 - NOTE:1385400.1 - NOTE:1322541.1 - NOTE:1501924.1 - NOTE:1023195.1 - Why cm I getting a message saying t there are too many connections when logging o?um Connection Limit Server: What is theg Or Reachedum Value for max_connections on L
12、inux?Server Variable: table_open_cache (Formerly Called table_cache)er: table_opehe Value is Not the Same as the Value Set Inf on Linuxreate morethreads on my Red Hat server?NOTE:1484095.1 - Error - Cant Create A New Thread (errno 11)htt /doc/refman/5.6/en/server-s em-variables.html# var_max_connect
13、ionshtt /doc/refman/5.6/en/server-s us-variables.html#s var_Max_used_connections3/4 SHOW GLOBAL S US LIKE Threads_running;+-+-+| Variable_name | Value |+-+-+| Threads_running | 2|+-+-+1 row in set (0.00 sec) SELECT * FROM information_schema.GLOBAL_S US WHERE VARIABLE_NAME = Threads_running;+-+-+| VA
14、RIABLE_NAME | VARIABLE_VALUE |+-+-+| THREADS_RUNNING | 2|+-+-+1 row in set (0.00 sec) SHOW GLOBAL S US LIKE Threads_connected;+-+-+| Variable_name| Value |+-+-+| Threads_connected | 4|+-+-+1 row in set (0.00 sec) SELECT * FROM information_schema.GLOBAL_S US WHERE VARIABLE_NAME = Threads_connected;+-+-+| VARIABLE_NAME| VARIABLE_VALUE |+-+-+| THREADS_CONNECTED | 4|+-+-+1 row in set (0.00 sec)Unless you are using a connection pool, make sure to disconnect fromas soon as the connection is dithk. If you cannot change the lication to disconnect, you can use eractive timeout an
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 高中一年级生物《遗传与进化》单元教学设计:基因型、表型与表观遗传调控-性状实现的分子逻辑
- 小学五年级综合实践·数据驱动与责任行动-家庭校园微环境浪费现象溯源与干预方案设计
- 小学三年级数学《0的乘法:从规则建构到迁移应用》教案
- 初中七年级道德与法治第四课情绪知识清单(统编版)
- 初中生物八年级中考核心知识清单:遗传与进化专题
- 初中一年级(七年级)科学《探索物质的微观本质:分子与原子》教学设计
- 初中数学九年级中考复习统计与概率专题讲评教案
- 2027山东专升本高数二 全微分计算专项训练习题集(逐题解析版)
- 2026年秋季小学统编版道德与法治四年级上册(新教材)教学计划附教学进度表
- 物业暗访考题及答案
- 临床重症患者营养支持护理
- 2026-2030中国干海产品行业深度调研及投资前景预测研究报告
- 2026年山西省中考英语试卷(含答案)
- 2026年广东省东莞市南城小学数学三下期中学业水平测试试题含解析
- 粉末冶金技术介绍
- 村级小微权力运行监督管理实施细则
- 【2026】超星尔雅学习通《大学生安全教育(入校篇)》章节测试及答案
- 2026年面条行业分析报告及未来发展趋势报告
- 2026年电力调度员考试押题密卷及完整答案详解(易错题)
- 2026年陆军战士留疆任职考试真题(附答案)
- 《韦氏智力量表第四版(wais-iv)中文版指导手册》
评论
0/150
提交评论