SlideShare a Scribd company logo
GDB MySQL参数Open-files-limit苏普2010-101
起源> Can't open file: '.\test\mytable.frm' (errno: 24)shell> perror 24OS error code 24: Too many open files尝试修改open_files_limitChanges the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files. mysqld uses the option value to reserve descriptors with setrlimit(). If the requested number of file descriptors cannot be allocated, mysqld writes a warning to the error log.
open_files_limitin my.cnf配置open_files_limit=10000global variables like "%open_files_limit%";+------------------+-------+| open_files_limit | 1024|+------------------+-------+配置open_files_limit=30000global variables like "%open_files_limit%";+------------------+-------+| open_files_limit | 1024|+------------------+-------+参数设置始终无效
Why?开启了一个痛苦代码追踪过程
gdb:watchgdb mysqld
(gdb) watch open_files_limit
(gdb) rOld value = 0New value = 20000Old value = 20000New value = 1024init_common_variables (...) at mysqld.cc:3355
Sql/mysqld.cc:3355max_open_files= max(max(wanted_files, max_connections*5),open_files_limit);3322  files= my_set_max_open_files(max_open_files);gdb mysqld
(gdb) b mysqld.cc:3322
(gdb) r
(gdb) nmysys/my_file.cuint my_set_max_open_files(uint files){...    files= set_max_open_files(min(files, OS_FILE_LIMIT));
mysys/my_file.cstatic uintset_max_open_files(uintmax_file_limit){...if (rlimit.rlim_cur >= max_file_limit) DBUG_RETURN(rlimit.rlim_cur);rlimit.rlim_cur= rlimit.rlim_max= max_file_limit;if (setrlimit(RLIMIT_NOFILE, &rlimit))}
Ad

More Related Content

What's hot (20)

Java memory problem cases solutions
Java memory problem cases solutionsJava memory problem cases solutions
Java memory problem cases solutions
bluedavy lin
 
[2017.03.18] hst binary training part 1
[2017.03.18] hst binary training   part 1[2017.03.18] hst binary training   part 1
[2017.03.18] hst binary training part 1
Chia-Hao Tsai
 
Mysql handle socket
Mysql handle socketMysql handle socket
Mysql handle socket
Philip Zhong
 
Mysql5.1 character set testing
Mysql5.1 character set testingMysql5.1 character set testing
Mysql5.1 character set testing
Philip Zhong
 
Cache and Drupal
Cache and DrupalCache and Drupal
Cache and Drupal
Kornel Lugosi
 
Etcd terraform by Alex Somesan
Etcd terraform by Alex SomesanEtcd terraform by Alex Somesan
Etcd terraform by Alex Somesan
Maarten van der Hoef
 
Compare mysql5.1.50 mysql5.5.8
Compare mysql5.1.50 mysql5.5.8Compare mysql5.1.50 mysql5.5.8
Compare mysql5.1.50 mysql5.5.8
Philip Zhong
 
JVM performance options. How it works
JVM performance options. How it worksJVM performance options. How it works
JVM performance options. How it works
Dmitriy Dumanskiy
 
GLX, DRI, and i965
GLX, DRI, and i965GLX, DRI, and i965
GLX, DRI, and i965
Chia-I Wu
 
Tweaking performance on high-load projects
Tweaking performance on high-load projectsTweaking performance on high-load projects
Tweaking performance on high-load projects
Dmitriy Dumanskiy
 
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
rivierarb
 
Handling 20 billion requests a month
Handling 20 billion requests a monthHandling 20 billion requests a month
Handling 20 billion requests a month
Dmitriy Dumanskiy
 
Hadley verse
Hadley verseHadley verse
Hadley verse
Ajay Ohri
 
Tuning Linux for Databases.
Tuning Linux for Databases.Tuning Linux for Databases.
Tuning Linux for Databases.
Alexey Lesovsky
 
Understanding and tuning WiredTiger, the new high performance database engine...
Understanding and tuning WiredTiger, the new high performance database engine...Understanding and tuning WiredTiger, the new high performance database engine...
Understanding and tuning WiredTiger, the new high performance database engine...
Ontico
 
OpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ CriteoOpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ Criteo
Nathaniel Braun
 
A Hands-on Introduction to MapReduce (in Python)
A Hands-on Introduction to MapReduce (in Python)A Hands-on Introduction to MapReduce (in Python)
A Hands-on Introduction to MapReduce (in Python)
David Massart
 
Compile kernel
Compile kernelCompile kernel
Compile kernel
Frank Pugalu
 
Rubyslava + PyVo #48
Rubyslava + PyVo #48Rubyslava + PyVo #48
Rubyslava + PyVo #48
Jozef Képesi
 
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Fwdays
 
Java memory problem cases solutions
Java memory problem cases solutionsJava memory problem cases solutions
Java memory problem cases solutions
bluedavy lin
 
[2017.03.18] hst binary training part 1
[2017.03.18] hst binary training   part 1[2017.03.18] hst binary training   part 1
[2017.03.18] hst binary training part 1
Chia-Hao Tsai
 
Mysql handle socket
Mysql handle socketMysql handle socket
Mysql handle socket
Philip Zhong
 
Mysql5.1 character set testing
Mysql5.1 character set testingMysql5.1 character set testing
Mysql5.1 character set testing
Philip Zhong
 
Compare mysql5.1.50 mysql5.5.8
Compare mysql5.1.50 mysql5.5.8Compare mysql5.1.50 mysql5.5.8
Compare mysql5.1.50 mysql5.5.8
Philip Zhong
 
JVM performance options. How it works
JVM performance options. How it worksJVM performance options. How it works
JVM performance options. How it works
Dmitriy Dumanskiy
 
GLX, DRI, and i965
GLX, DRI, and i965GLX, DRI, and i965
GLX, DRI, and i965
Chia-I Wu
 
Tweaking performance on high-load projects
Tweaking performance on high-load projectsTweaking performance on high-load projects
Tweaking performance on high-load projects
Dmitriy Dumanskiy
 
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
rivierarb
 
Handling 20 billion requests a month
Handling 20 billion requests a monthHandling 20 billion requests a month
Handling 20 billion requests a month
Dmitriy Dumanskiy
 
Hadley verse
Hadley verseHadley verse
Hadley verse
Ajay Ohri
 
Tuning Linux for Databases.
Tuning Linux for Databases.Tuning Linux for Databases.
Tuning Linux for Databases.
Alexey Lesovsky
 
Understanding and tuning WiredTiger, the new high performance database engine...
Understanding and tuning WiredTiger, the new high performance database engine...Understanding and tuning WiredTiger, the new high performance database engine...
Understanding and tuning WiredTiger, the new high performance database engine...
Ontico
 
OpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ CriteoOpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ Criteo
Nathaniel Braun
 
A Hands-on Introduction to MapReduce (in Python)
A Hands-on Introduction to MapReduce (in Python)A Hands-on Introduction to MapReduce (in Python)
A Hands-on Introduction to MapReduce (in Python)
David Massart
 
Rubyslava + PyVo #48
Rubyslava + PyVo #48Rubyslava + PyVo #48
Rubyslava + PyVo #48
Jozef Képesi
 
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Fwdays
 

Similar to Mysql gdb-101022041146-phpapp01 (20)

Php version 7
Php version 7Php version 7
Php version 7
RANVIJAY GAUR
 
Get mysql clusterrunning-windows
Get mysql clusterrunning-windowsGet mysql clusterrunning-windows
Get mysql clusterrunning-windows
JoeSg
 
Mysql wp cluster_quickstart_windows
Mysql wp cluster_quickstart_windowsMysql wp cluster_quickstart_windows
Mysql wp cluster_quickstart_windows
Rogério Rocha
 
My SQL 101
My SQL 101My SQL 101
My SQL 101
Dave Stokes
 
Highload Perf Tuning
Highload Perf TuningHighload Perf Tuning
Highload Perf Tuning
HighLoad2009
 
Tek tutorial
Tek tutorialTek tutorial
Tek tutorial
Ligaya Turmelle
 
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and NagiosNagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios
 
MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017
Dave Stokes
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
Yiwei Ma
 
1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster
OlinData
 
DPC Tutorial
DPC TutorialDPC Tutorial
DPC Tutorial
Ligaya Turmelle
 
Service discovery and configuration provisioning
Service discovery and configuration provisioningService discovery and configuration provisioning
Service discovery and configuration provisioning
Source Ministry
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupal
Andrii Podanenko
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
Roland Bouman
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
Roland Bouman
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
Frederic Descamps
 
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and NagiosNagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios
 
Big Data Analytics using Mahout
Big Data Analytics using MahoutBig Data Analytics using Mahout
Big Data Analytics using Mahout
IMC Institute
 
MongoDB London 2013: Basic Replication in MongoDB presented by Marc Schwering...
MongoDB London 2013: Basic Replication in MongoDB presented by Marc Schwering...MongoDB London 2013: Basic Replication in MongoDB presented by Marc Schwering...
MongoDB London 2013: Basic Replication in MongoDB presented by Marc Schwering...
MongoDB
 
Firebird
FirebirdFirebird
Firebird
Chinsan Huang
 
Get mysql clusterrunning-windows
Get mysql clusterrunning-windowsGet mysql clusterrunning-windows
Get mysql clusterrunning-windows
JoeSg
 
Mysql wp cluster_quickstart_windows
Mysql wp cluster_quickstart_windowsMysql wp cluster_quickstart_windows
Mysql wp cluster_quickstart_windows
Rogério Rocha
 
Highload Perf Tuning
Highload Perf TuningHighload Perf Tuning
Highload Perf Tuning
HighLoad2009
 
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and NagiosNagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios
 
MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017
Dave Stokes
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
Yiwei Ma
 
1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster
OlinData
 
Service discovery and configuration provisioning
Service discovery and configuration provisioningService discovery and configuration provisioning
Service discovery and configuration provisioning
Source Ministry
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupal
Andrii Podanenko
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
Roland Bouman
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
Roland Bouman
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
Frederic Descamps
 
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and NagiosNagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios
 
Big Data Analytics using Mahout
Big Data Analytics using MahoutBig Data Analytics using Mahout
Big Data Analytics using Mahout
IMC Institute
 
MongoDB London 2013: Basic Replication in MongoDB presented by Marc Schwering...
MongoDB London 2013: Basic Replication in MongoDB presented by Marc Schwering...MongoDB London 2013: Basic Replication in MongoDB presented by Marc Schwering...
MongoDB London 2013: Basic Replication in MongoDB presented by Marc Schwering...
MongoDB
 
Ad

More from Bob Huang (15)

Gsm 03-42 v300
Gsm 03-42 v300Gsm 03-42 v300
Gsm 03-42 v300
Bob Huang
 
Gsm 04.08
Gsm 04.08Gsm 04.08
Gsm 04.08
Bob Huang
 
Oracle 经验操作
Oracle 经验操作Oracle 经验操作
Oracle 经验操作
Bob Huang
 
Cap信令原理
Cap信令原理Cap信令原理
Cap信令原理
Bob Huang
 
Gsm智能网原理
Gsm智能网原理Gsm智能网原理
Gsm智能网原理
Bob Huang
 
移动智能应答业务
移动智能应答业务移动智能应答业务
移动智能应答业务
Bob Huang
 
浙江电信移动业务接入实践20100513
浙江电信移动业务接入实践20100513浙江电信移动业务接入实践20100513
浙江电信移动业务接入实践20100513
Bob Huang
 
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Bob Huang
 
高性能网站建设指南
高性能网站建设指南高性能网站建设指南
高性能网站建设指南
Bob Huang
 
百度排名优化方法及注意事项
百度排名优化方法及注意事项百度排名优化方法及注意事项
百度排名优化方法及注意事项
Bob Huang
 
Random 101214055524-phpapp01
Random 101214055524-phpapp01Random 101214055524-phpapp01
Random 101214055524-phpapp01
Bob Huang
 
Mysql 101014202926-phpapp01
Mysql 101014202926-phpapp01Mysql 101014202926-phpapp01
Mysql 101014202926-phpapp01
Bob Huang
 
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Bob Huang
 
201001 100208094620-phpapp01
201001 100208094620-phpapp01201001 100208094620-phpapp01
201001 100208094620-phpapp01
Bob Huang
 
Gsm 03-42 v300
Gsm 03-42 v300Gsm 03-42 v300
Gsm 03-42 v300
Bob Huang
 
Oracle 经验操作
Oracle 经验操作Oracle 经验操作
Oracle 经验操作
Bob Huang
 
Cap信令原理
Cap信令原理Cap信令原理
Cap信令原理
Bob Huang
 
Gsm智能网原理
Gsm智能网原理Gsm智能网原理
Gsm智能网原理
Bob Huang
 
移动智能应答业务
移动智能应答业务移动智能应答业务
移动智能应答业务
Bob Huang
 
浙江电信移动业务接入实践20100513
浙江电信移动业务接入实践20100513浙江电信移动业务接入实践20100513
浙江电信移动业务接入实践20100513
Bob Huang
 
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Bob Huang
 
高性能网站建设指南
高性能网站建设指南高性能网站建设指南
高性能网站建设指南
Bob Huang
 
百度排名优化方法及注意事项
百度排名优化方法及注意事项百度排名优化方法及注意事项
百度排名优化方法及注意事项
Bob Huang
 
Random 101214055524-phpapp01
Random 101214055524-phpapp01Random 101214055524-phpapp01
Random 101214055524-phpapp01
Bob Huang
 
Mysql 101014202926-phpapp01
Mysql 101014202926-phpapp01Mysql 101014202926-phpapp01
Mysql 101014202926-phpapp01
Bob Huang
 
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Introduction to-taobao-cdn-at-linuxfb-v0-2-100620101417-phpapp01
Bob Huang
 
201001 100208094620-phpapp01
201001 100208094620-phpapp01201001 100208094620-phpapp01
201001 100208094620-phpapp01
Bob Huang
 
Ad

Mysql gdb-101022041146-phpapp01

  翻译: