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

I've a bit of a problem with MySQL crashing once every ~24h.

This is the error log.

121205  9:42:49 [Note] Plugin 'FEDERATED' is disabled.
121205  9:42:49 InnoDB: The InnoDB memory heap is disabled
121205  9:42:49 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121205  9:42:49 InnoDB: Compressed tables use zlib 1.2.3.4
121205  9:42:49 InnoDB: Initializing buffer pool, size = 512.0M
121205  9:42:49 InnoDB: Completed initialization of buffer pool
121205  9:42:49 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
121205  9:42:49  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...
121205  9:42:49  InnoDB: Waiting for the background threads to start
121205  9:42:50 InnoDB: 1.1.8 started; log sequence number 2449055943
121205  9:42:50 [Note] Event Scheduler: Loaded 0 events
121205  9:42:50 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.22-0ubuntu1-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 49827  (Ubuntu)
121205  9:42:51 [ERROR] /usr/sbin/mysqld: Table './application/songs' is marked as crashed and should be repaired
121205  9:42:51 [Warning] Checking table:   './application/songs'
121205  9:42:51 [ERROR] /usr/sbin/mysqld: Table './application/artists' is marked as crashed and should be repaired
121205  9:42:51 [Warning] Checking table:   './application/artists'
121205  9:42:52 [ERROR] /usr/sbin/mysqld: Table './application/channels' is marked as crashed and should be repaired
121205  9:42:52 [Warning] Checking table:   './application/channels'
121205 10:50:57 [Note] Plugin 'FEDERATED' is disabled.
121205 10:50:57 InnoDB: The InnoDB memory heap is disabled
121205 10:50:57 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121205 10:50:57 InnoDB: Compressed tables use zlib 1.2.3.4
121205 10:50:57 InnoDB: Initializing buffer pool, size = 512.0M
121205 10:50:57 InnoDB: Completed initialization of buffer pool
121205 10:50:57 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
121205 10:50:57  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...
121205 10:50:57  InnoDB: Waiting for the background threads to start
121205 10:50:58 InnoDB: 1.1.8 started; log sequence number 2449882518
121205 10:50:58 [Note] Event Scheduler: Loaded 0 events
121205 10:50:58 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.22-0ubuntu1-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 49827  (Ubuntu)
121205 10:50:59 [ERROR] /usr/sbin/mysqld: Table './application/artists' is marked as crashed and should be repaired
121205 10:50:59 [Warning] Checking table:   './application/artists'
121205 10:50:59 [ERROR] /usr/sbin/mysqld: Table './application/songs' is marked as crashed and should be repaired
121205 10:50:59 [Warning] Checking table:   './application/songs'
121205 10:51:00 [ERROR] /usr/sbin/mysqld: Table './application/channels' is marked as crashed and should be repaired
121205 10:51:00 [Warning] Checking table:   './application/channels'

It crashed right after 10:51 (like in the log).

Why is this happening?

My current system

  • MySQL Ver 14.14 Distrib 5.5.22, for debian-linux-gnu (x86_64) using readline 6.2
  • Ubuntu 12.04 LTS
share|improve this question
1  
You should look at the system logs as well as the MySQL logs. Whatever is happening is preventing MySQL from logging it. –  Jeff Ferland Dec 5 '12 at 19:56

1 Answer 1

up vote 3 down vote accepted

My guess (and this is a wild stab in the dark with this amount of information) is that a cron job runs at the same time each day and uses up a bunch of memory, so Linux helpfully kills some other process that's using a lot of memory.

Check your logs for oom-killer.

How much RAM do you have? How much does MySQL use? What else is running on the box?

share|improve this answer
    
The VPS has 3Gb, MySQL is using 638MB and 94% of the memory is being used. –  Oleander Dec 5 '12 at 19:59
    
I increased the memory on the VPS with 500MB, which solved the problem. Thanks. –  Oleander Dec 10 '12 at 11:14

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.