MySQL 填满内存并冻结
我的 MySQL 服务器 (Debian/Lenny) 有问题。有时MySQL守护进程会填满内存并且页面无法访问。重新启动 MySQL 守护进程会有所帮助,有时我必须重新启动整个服务器(无法再使用 SSH 连接)。这是错误日志:
InnoDB: Error: pthread_create returned 12
> 110228 23:58:36 InnoDB:已启动;日志序列号 0 43695
110228 23:58:36 [注意] /usr/sbin/mysqld:准备连接。
版本:'5.0.51a-24+lenny5'套接字:'/var/run/mysqld/mysqld.sock'端口:3306(Debian)。 编辑
问
题是,我没有使用InnoDB引擎。我的所有表都在 MyISAM 引擎中。 SHOW ENGINES
说:没有 InnoDB。我以前做过。
这是我的.cnf
[客户端]
端口 = 3306
套接字= /var/run/mysqld/mysqld.sock[mysqld_safe]
套接字=/var/run/mysqld/mysqld.sock
不错 = 0
日志错误= /var/log/mysql/error.log[mysqld]
用户=mysql
pid 文件 = /var/run/mysqld/mysqld.pid
套接字 = /var/run/mysqld/mysqld.sock
端口 = 3306
基于目录 = /usr
数据目录 = /var/lib/mysql
tmpdir = /tmp
语言 = /usr/share/mysql/english
跳过外部锁定
日志错误= /var/log/mysql/error.log
绑定地址 = 127.0.0.1
key_buffer = 16M
最大允许数据包 = 16M
线程堆栈 = 128K
线程缓存大小=8
myisam-recover = 备份
query_cache_limit = 1M
query_cache_size = 16M
expire_logs_days = 10
max_binlog_size = 100M
跳过-bdb[mysqldump]
快
引用名称
max_allowed_packet = 16M[mysql]
[isamchk] key_buffer = 16M!includedir /etc/mysql/conf.d/
内存配置?我不确定你的意思。你能解释一下吗?谢谢!!
有人可以向我解释一下吗?谢谢并抱歉我的英语。
I have problem with my MySQL server (Debian/Lenny). Sometimes MySQL daemon fill memory and pages are not accesible. Restart of MySQL daemon helps, sometimes I have to restart whole server (can't connect with SSH anymore). Here is error log:
InnoDB: Error: pthread_create returned 12<br/>
110228 23:58:36 InnoDB: Started; log sequence number 0 43695
110228 23:58:36 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.51a-24+lenny5' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Debian).
EDIT
Problem is, that I'm not using InnoDB engine. All my tables are in MyISAM engine. SHOW ENGINES
says: No InnoDB. I did it before.
Here is my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock[mysqld_safe]
socket=/var/run/mysqld/mysqld.sock
nice = 0
log-error = /var/log/mysql/error.log[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
log-error = /var/log/mysql/error.log
bind-address = 127.0.0.1
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
expire_logs_days = 10
max_binlog_size = 100M
skip-bdb[mysqldump]
quick
quote-names
max_allowed_packet = 16M[mysql]
[isamchk] key_buffer = 16M!includedir /etc/mysql/conf.d/
And memory config? I'm not sure what you mean. Can you explain please? THANKS!!
Can anybody explain it to me? Thanks and sorry for my english.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一个mysql调优入门脚本:
http://www.day32.com/MySQL/
直接地址要下载的脚本: http://www.day32.com/MySQL/tuning-primer.sh
在您的数据库服务器上运行此脚本。它分析为缓冲区分配了多少内存和可用内存并给出建议。根据建议减少 mysql 缓冲区的大小。
There's a mysql tuning primer script:
http://www.day32.com/MySQL/
Direct address of script to download: http://www.day32.com/MySQL/tuning-primer.sh
Run this script on your database server. It analizes how much memory is alloted for buffers and available memory and gives recommendations. Based on recommendations decrease sizes of mysql buffers.