1

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
1
  • 1
    You should look at the system logs as well as the MySQL logs. Whatever is happening is preventing MySQL from logging it. Dec 5, 2012 at 19:56

1 Answer 1

3

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?

2
  • The VPS has 3Gb, MySQL is using 638MB and 94% of the memory is being used. Dec 5, 2012 at 19:59
  • I increased the memory on the VPS with 500MB, which solved the problem. Thanks. Dec 10, 2012 at 11:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .