List:General Discussion« Previous MessageNext Message »
From: Date:November 4 2010 1:21am
Subject:Out of memory error
View as plain text  
Dear MySQL users,

I got an "Out of memory" error message on server yesterday.
I restarted mysqld, and everything was go back to normal and now is fine.

It happened already twice in this weekend even.
But I don't know what's wrong.

Server has QuadCore Xeon CPU, 4G ECC RAM, 2G x 49(ea) ibdata files, mostly based on using InnoDB typed tables.

Below is server condition details.

[root@svr40 mysql]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 77824
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 77824
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[root@svr40 mysql]# uname -a
Linux svr40.hsl.co.kr 2.6.18-164.11.1.el5PAE #1 SMP Wed Jan 20 08:16:13 EST 2010 i686 i686 i386 GNU/Linux
[root@svr40 mysql]# cat /etc/redhat-release 
CentOS release 5.4 (Final)
[root@svr40 mysql]# rpm -qa | grep MySQL
MySQL-devel-community-5.1.42-0.rhel5
MySQL-client-community-5.1.42-0.rhel5
MySQL-server-community-5.1.42-0.rhel5
[root@svr40 mysql]# tail -50 svr40.xxxx.err 
101103 15:12:25 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:12:25 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:12:25 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:12:25 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:12:28 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095116 bytes)
101103 15:12:38 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:12:38 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:12:42 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095236 bytes)
101103 15:12:43 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095584 bytes)
101103 15:12:45 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:12:45 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:12:47 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095200 bytes)
101103 15:12:51 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095116 bytes)
101103 15:13:12 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095120 bytes)
101103 15:13:16 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:13:16 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:13:19 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095120 bytes)
101103 15:13:22 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095548 bytes)
101103 15:13:23 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:13:23 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:13:28 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095548 bytes)
101103 15:13:32 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:13:34 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095500 bytes)
101103 15:13:38 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095548 bytes)
101103 15:13:38 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095392 bytes)
101103 15:13:40 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095120 bytes)
101103 15:13:40 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095120 bytes)
101103 15:13:41 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:13:41 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095132 bytes)
101103 15:13:45 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095548 bytes)
101103 15:13:49 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095200 bytes)
101103 15:13:51 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095128 bytes)
101103 15:13:51 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095284 bytes)
101103 15:13:52 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095548 bytes)
101103 15:13:57 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095128 bytes)
101103 15:13:57 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2095284 bytes)
101103 15:14:02 [Note] /usr/sbin/mysqld: Normal shutdown

101103 15:14:02 [Note] Event Scheduler: Purging the queue. 0 events
101103 15:14:04  InnoDB: Starting shutdown...
101103 15:14:08  InnoDB: Shutdown completed; log sequence number 10 437654676
101103 15:14:08 [Note] /usr/sbin/mysqld: Shutdown complete

101103 15:14:08 mysqld_safe mysqld from pid file /var/lib/mysql/svr40.xxx.pid ended
101103 15:14:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
101103 15:14:15 [Note] Plugin 'FEDERATED' is disabled.
101103 15:14:16  InnoDB: Started; log sequence number 10 437654676
101103 15:14:16 [Note] Event Scheduler: Loaded 0 events
101103 15:14:16 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.42-community-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)

[root@svr40 mysql]# cat /etc/my.cnf

.
.
.
.
[mysqld]
max_connections = 500
max_connect_errors = 30
table_open_cache = 4096
max_allowed_packet = 16M
binlog_cache_size = 1M
max_binlog_size = 100M
expire_logs_days = 7
max_heap_table_size = 64M
sort_buffer_size = 8M
join_buffer_size = 8M
thread_cache_size = 8
thread_concurrency = 8
query_cache_size = 64M
query_cache_limit = 2M
tmp_table_size = 64M
log-bin=mysql-bin
binlog_format=mixed
slow_query_log
long_query_time = 30\

key_buffer_size = 32M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1

innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 2G
innodb_data_file_path = ibdata1:2G;ibdata2:2G;................ibdata45:2G;ibdata46:100M:autoextend
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 8M
innodb_log_file_size = 512M 
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
.
.
.

I expect the trouble-shooting soon, at least the reason catching.


Thank you.

Kim Chi
Thread
Out of memory error4 Nov
  • Re: Out of memory errorSharl.Jimh.Tsin4 Nov
  • Re: Out of memory errorJohan De Meersman4 Nov