免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 4857 | 回复: 17
打印 上一主题 下一主题

紧急,mysqld错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-08-14 09:06 |只看该作者 |倒序浏览
mysqld.log中突然出现以下错误,请问是什么原因造成的? 谢谢!

Number of processes running now: 0
080813 21:54:04  mysqld restarted
080813 21:54:06  InnoDB: Started; log sequence number 0 43655
^G/usr/local/mysql/bin/mysqld: Out of memory (Needed 59381760 bytes)
080813 21:54:07 [Warning] mysql.user table is not updated to new password format; Disabling new password usage until mysql_fix_privilege_tables is run
080813 21:54:07 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
080813 21:54:07 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.26-standard'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)

论坛徽章:
0
2 [报告]
发表于 2008-08-14 09:15 |只看该作者
There are two points here.

1、^G/usr/local/mysql/bin/mysqld: Out of memory (Needed 59381760 bytes)
2、080813 21:54:07 [Warning] mysql.user table is not updated to new password format; Disabling new password usage until mysql_fix_privilege_tables is run

Although the last is an warning,you should fix it.

论坛徽章:
0
3 [报告]
发表于 2008-08-14 09:15 |只看该作者
参数据配置如下(物理内存 2G)

max_connections         = 500
max_connect_errors      = 100000
key_buffer              = 256M
myisam_sort_buffer_size = 51200000
join_buffer_size        = 32M
read_buffer_size        = 64M
sort_buffer_size        = 32M
table_cache             = 1000
thread_cache_size       = 80
max_join_size           = 512000000
max_binlog_cache_size   = 512000000
tmp_table_size          = 102400000
max_heap_table_size     = 102400000
read_rnd_buffer_size    = 5242880
bulk_insert_buffer_size = 64M
thread_concurrency      = 2
query_cache_limit       = 4000000
query_cache_size        = 0
query_cache_type        = 1
wait_timeout            = 7200
interactive_timeout     = 7200

论坛徽章:
0
4 [报告]
发表于 2008-08-14 09:18 |只看该作者
join_buffer_size        = 32M
read_buffer_size        = 64M
sort_buffer_size        = 32M

这是每session都要分配的内存,减小到1M以下再调。

论坛徽章:
0
5 [报告]
发表于 2008-08-14 09:28 |只看该作者
This is my configuration.
join_buffer_size        = 2M
read_buffer_size        = 2M
sort_buffer_size        = 32M

They belong to thread level,so you should decrease these parameters.

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
6 [报告]
发表于 2008-08-14 09:30 |只看该作者
原帖由 yejr 于 2008-8-14 09:18 发表
join_buffer_size        = 32M
read_buffer_size        = 64M
sort_buffer_size        = 32M

这是每session都要分配的内存,减小到1M以下再调。


每个session固定分配的内存?是最大可用值吧。

sort_buffer_size = 256M。

我刚看了一下我的配置read的是32.

如果是每个session固定分配,如果我有一百个连接,那就要占用内存1000*256M??应该是动态分配可用值吧。

论坛徽章:
0
7 [报告]
发表于 2008-08-14 09:32 |只看该作者

回复 #6 枫影谁用了 的帖子

如果100个连接同时进行QUERY呢?

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
8 [报告]
发表于 2008-08-14 09:37 |只看该作者
原帖由 yueliangdao0608 于 2008-8-14 09:32 发表
如果100个连接同时进行QUERY呢?


如果这样的话倒是。

论坛徽章:
0
9 [报告]
发表于 2008-08-14 09:56 |只看该作者
试试:

read_buffer_size = 128K
read_rnd_buffer_size = 1M
sort_buffer_size = 2M
join_buffer_size = 2M

其中 read_buffer_size 你可以调整,这个在不同情况下性能差别比较大
并不是越大越好,事实上可能会降低性能

你可以测试32k 64k 128k ... 看哪个值最适合你的系统

祝好运

论坛徽章:
0
10 [报告]
发表于 2008-08-14 10:30 |只看该作者
好的,谢谢各位
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP