付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 特色小镇实施方案案例
- 桂林商城小程序建设方案
- 2025年校园二手校市场细分领域市场潜力与商业模式创新
- 营销渠道2025年品牌形象塑造方案
- 舞蹈主题墙建设方案
- 社区药店药品安全知识宣传月活动方案
- 调结构工作方案
- 农村客运的实施方案
- 工程建设软件实施方案
- 基于大数据的2025年货损理赔通道风险预警报告
- 企业组织架构优化与战略对接分析
- 绿色生产制度
- 道路附属物拆除施工方案
- 2026年职业病防治培训课件
- 2026北京保障房中心有限公司校园招聘(公共基础知识)测试题带答案解析
- 农产品经纪人岗位招聘考试试卷及答案
- 驾考宝典无人机试题
- 《雄安新区地标美食质量技术规范》
- 2025年中国化学奥林匹克竞赛浙江赛区预赛试题及答案
- 拌合站安全教育培训计划
- 房地产个人销售年度工作总结
评论
0/150
提交评论