免费注册 查看新帖 |

Chinaunix

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

out of memory [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-23 08:01 |只看该作者 |倒序浏览
我最近 用和你的同样的版本,遇到了和你的同样的问题。
080719 22:06:58 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15072540 bytes)
080719 22:06:58 [ERROR] /usr/sbin/mysqld: Sort aborted
080719 22:06:59 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 8388572 bytes)
080719 22:08:09 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2091064 bytes)
080719 22:08:16 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2091144 bytes)
080719 22:08:22 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 960 bytes)
080719 22:08:22 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 8164 bytes)
080719 22:08:22 [ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
080719 22:08:22 - mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=25165824
read_buffer_size=2093056
max_used_connections=234
max_connections=1024
threads_connected=234
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 2117624 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x2d92a570
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0x415458cc, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x81c4317
0x814601d
0x814625e
0x8149c35
0x820c7c8
0x82041cb
0x820477b
0x8222b9f
0x822a698
0x822a93d
0x81db11e
0x81e18ba
0x81e2766
0x81e31b7
0x81e3bf0
0x4423cc
0x3ad1ae
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/using-stack-trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x44df4280  is invalid pointer
thd->thread_id=741524
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.
080719 22:08:22 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2020 bytes)
080719 22:08:22 [ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space

Number of processes running now: 0
080719 22:08:22  mysqld restarted
InnoDB: Log scan progressed past the checkpoint lsn 17 1153736831
080719 22:08:22  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 17 1158979584
InnoDB: Doing recovery: scanned up to log sequence number 17 1162681199
InnoDB: 2 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 5 row operations to undo
InnoDB: Trx id counter is 0 508687104
080719 22:08:23  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: In a MySQL replication slave the last master binlog file
InnoDB: position 0 752211, file name newbbs-bin.000949
InnoDB: Last MySQL binlog file position 0 338398413, file name /var/lib/mysql/binlog/bbs-bin.000123
080719 22:08:29  InnoDB: Started; log sequence number 17 1162681199
InnoDB: Starting in background the rollback of uncommitted transactions
080719 22:08:29  InnoDB: Rolling back trx with id 0 508686541, 4 rows to undo

InnoDB: Rolling back of trx id 0 508686541 completed
080719 22:08:29  InnoDB: Rolling back trx with id 0 508686090, 1 rows to undo

InnoDB: Rolling back of trx id 0 508686090 completed
080719 22:08:29  InnoDB: Rollback of non-prepared transactions completed
080719 22:08:29 [Note] Recovering after a crash using /var/lib/mysql/binlog/bbs-bin
080719 22:08:35 [Note] Starting crash recovery...
080719 22:08:35 [Note] Crash recovery finished.
080719 22:08:35 [Warning] 'user' entry 'root@localhost.localdomain' ignored in --skip-name-resolve mode.
080719 22:08:35 [Warning] 'user' entry '@localhost.localdomain' ignored in --skip-name-resolve mode.
080719 22:08:35 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.51a-community-log'  socket: '/usr/local/mysql/mysql.sock'  port: 3306  MySQL Community Edition (GPL)
080719 22:10:15 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 8388572 bytes)
080719 22:10:56 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2091204 bytes)
080719 22:10:59 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2091064 bytes)
080719 22:11:01  InnoDB: Error: cannot allocate 901120 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 1286660988 bytes. Operating system errno: 12
InnoDB: Check if you should increase the swap file or
InnoDB: ulimits of your operating system.
InnoDB: On FreeBSD check you have compiled the OS with
InnoDB: a big enough maximum process size.
InnoDB: Note that in most 32-bit computers the process
InnoDB: memory space is limited to 2 GB or 4 GB.
InnoDB: We keep retrying the allocation for 60 seconds...

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
2 [报告]
发表于 2008-07-23 08:24 |只看该作者
这个明显是设置问题。my.cnf里的值调低。

论坛徽章:
0
3 [报告]
发表于 2008-07-23 09:04 |只看该作者
080719 22:06:58 [ERROR] /usr/sbin/mysqld: Sort aborted

Check if you have pool sql statement.

论坛徽章:
0
4 [报告]
发表于 2008-07-23 09:09 |只看该作者
这个问题我以前也碰到过,跟my.cnf的配置没有关系。原因是数据文件从其他数据库中Copy过来,但是Copy的过程中源数据库没有shutdown,不一致的数据文件和Mysql隐含的 Bug造成了这个错误。

论坛徽章:
0
5 [报告]
发表于 2008-09-05 08:23 |只看该作者
原帖由 枫影谁用了 于 2008-7-23 08:24 发表
这个明显是设置问题。my.cnf里的值调低。


参数 哪里有问题呢?
###my.cnf###
client]
port            = 3306
socket          = /opt/mysql/mysql.sock

[mysqld]
port            = 3306
socket          = /opt/mysql/mysql.sock
datadir         = /usr/local/mysql
open_files_limit = 8192
interactive_timeout=300
wait_timeout=300
default-storage-engine = INNODB
lower_case_table_names = 1

back_log = 500
skip-name-resolve

max_connections = 1024
max_connect_errors = 50
table_cache = 4096
max_allowed_packet = 64M
binlog_cache_size = 8M
max_heap_table_size = 128M
tmp_table_size = 128M
sort_buffer_size = 16M
join_buffer_size = 32M
thread_cache_size = 128
thread_concurrency = 8
query_cache_type = 1
query_cache_size = 512M
query_cache_limit = 16M
ft_min_word_len = 4
thread_stack = 192K
transaction_isolation = REPEATABLE-READ

log             = /var/lib/mysql/log/log
log-slow-queries= /var/lib/mysql/log/bbs-slow.log
long_query_time = 5
log_long_format

log-bin         = /var/lib/mysql/binlog/bbs-bin
server-id       = 203
binlog-do-db = cci
binlog-do-db = cge
binlog-do-db = logbbs

relay-log = /var/lib/mysql/binlog/bbs-relay-bin1
log-warnings
skip-slave-start

key_buffer_size = 24M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 64M
myisam_max_sort_file_size = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover

skip-bdb

innodb_additional_mem_pool_size = 100M
innodb_buffer_pool_size = 1G
innodb_data_file_path = ibdata1:1000M;ibdata2:1000M:autoextend
innodb_data_home_dir = /opt/mysql/
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 200M
innodb_log_files_in_group = 2
innodb_log_group_home_dir = /opt/mysql/
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 8M
write_buffer = 8M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 8M
write_buffer = 8M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]

论坛徽章:
0
6 [报告]
发表于 2008-09-05 08:26 |只看该作者

高手请指路 THX

最近又有这个问题了!
080905  1:14:56 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:14:56 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:15:13 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:15:13 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:15:22 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:15:22 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:15:31 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:15:31 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:15:58 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:15:58 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:16:07 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:16:07 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:17:01 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:17:01 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:17:23 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:17:23 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:17:28 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:17:28 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:17:41 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:17:41 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:19:31 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 14874720 bytes)
080905  1:19:31 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:20:40 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 13298485 bytes)
080905  1:20:40 [ERROR] /usr/sbin/mysqld: Sort aborted

论坛徽章:
0
7 [报告]
发表于 2008-09-05 10:34 |只看该作者
table_cache = 4096
max_allowed_packet = 64M
binlog_cache_size = 8M
max_heap_table_size = 128M
tmp_table_size = 128M
sort_buffer_size = 16M
join_buffer_size = 32M


搞小点吧。

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
8 [报告]
发表于 2008-09-05 10:39 |只看该作者
原帖由 hyran 于 2008-9-5 08:26 发表
最近又有这个问题了!
080905  1:14:56 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 15180224 bytes)
080905  1:14:56 [ERROR] /usr/sbin/mysqld: Sort aborted
080905  1:15:13 [ERROR] /usr/sbin/my ...



你有很多排序的操作?

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
9 [报告]
发表于 2008-09-05 10:41 |只看该作者
原帖由 yueliangdao0608 于 2008-9-5 10:34 发表
table_cache = 4096
max_allowed_packet = 64M
binlog_cache_size = 8M
max_heap_table_size = 128M
tmp_table_size = 128M
sort_buffer_size = 16M
join_buffer_size = 32M


搞小点吧。


排序多的话
sort先不动
将别的参数适当改小点

论坛徽章:
0
10 [报告]
发表于 2008-09-07 22:33 |只看该作者

回复 #9 ruochen 的帖子

谢谢! 我测试下。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP