Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've had a openSUSE 11.4 VM running for quite some time with no problems. Recently, ever day or so my MariaDB (MySQL fork) will crash out of nowhere. Nothing has really changed as far as database side or site traffic. When I restart MySQL, I see the following:

120911 02:09:33 mysqld_safe Number of processes running now: 0
120911 02:09:40 mysqld_safe mysqld restarted
120911  2:17:07 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.5
120911  2:17:52  InnoDB: Initializing buffer pool, size = 80.0M
120911  2:17:52  InnoDB: Completed initialization of buffer pool
120911 02:18:47 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
120911 09:57:06 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120911  9:57:07 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.5
120911  9:57:07  InnoDB: Initializing buffer pool, size = 80.0M
120911  9:57:07  InnoDB: Completed initialization of buffer pool

Occasionally I use to see errors like these in my logs:

InnoDB: mmap(550764544 bytes) failed; errno 12
120904  2:08:50InnoDB: Fatal error: cannot allocate the memory for the buffer pool
120904  2:08:50 [ERROR] Plugin 'InnoDB' init function returned error.
120904  2:08:50 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120904  2:08:50 [ERROR] Failed to initialize plugins.
120904  2:08:50 [ERROR] Aborting

But I played around with my buffer pool size and now I don't even get that error. The entire size of /var/lib/mysql is 669 MB on disk. 604M is the size of all the mysql-bin files, with the actual database directories only being 46MB.

My actual my.cnf is as follows:

[client]
port        = 3306
socket      = /var/run/mysql/mysql.sock

[mysqld]
port        = 3306
socket      = /var/run/mysql/mysql.sock
datadir = /var/lib/mysql
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 2M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

log-bin=mysql-bin
binlog_format=mixed
server-id   = 1
innodb_buffer_pool_size = 80M

[safe_mysqld]
log-error   = /var/log/mysql/mysqld.log
socket      = /var/run/mysql/mysql.sock

!include_dir /etc/mysql

[mysqldump]
socket      = /var/run/mysql/mysql.sock
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld_multi]
mysqld     = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
log        = /var/log/mysqld_multi.log
share|improve this question
    
Please show us some lines above the 120907 2:28:53 InnoDB: highest supported file format is Barracuda.? –  quanta Sep 11 '12 at 10:19
    
The logs very clearly instruct you to repair the damaged table. Have you don so? –  John Gardeniers Sep 11 '12 at 10:41
    
I didn't realize I needed to repair the tables. I though that typically happened after a crash and it repaired the tables on startup. I ran mysqlcheck with --auto-repair and all the tables came back OK. I also added the additional lines from my log above. –  djsumdog Sep 11 '12 at 12:18
    
Even after a repair, the service still randomly crashes. After the most recent crash, I saw this in the logs: [ERROR] mysqld: Out of memory (Needed 128909312 bytes). I don't understand how I could be running out of memory. The database just holds static content. It's not even growing. –  djsumdog Sep 12 '12 at 9:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.