【问题标题】:InnoDB crashes frequentlyInnoDB 经常崩溃
【发布时间】:2014-01-29 14:27:13
【问题描述】:

我的 Innodb 引擎经常崩溃。 我找不到这背后的原因。

这是错误日志:

140129 9:22:49 [Note] Plugin 'FEDERATED' is disabled. 
140129 9:22:49 InnoDB: The InnoDB memory heap is disabled 
140129 9:22:49 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
140129 9:22:49 InnoDB: Compressed tables use zlib 1.2.3.4 
140129 9:22:50 InnoDB: Initializing buffer pool, size = 128.0M 
140129 9:22:50 InnoDB: Completed initialization of buffer pool 
140129 9:22:50 InnoDB: highest supported file format is Barracuda. 
               InnoDB: Log scan progressed past the checkpoint lsn 275341002 
140129 9:22:50 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 275341421 
               InnoDB: 3 transaction(s) which must be rolled back or cleaned up 
               InnoDB: in total 15 row operations to undo 
               InnoDB: Trx id counter is 294A00 
140129 9:22:51 InnoDB: Starting an apply batch of log records to the database... 
               InnoDB: Progress in percents: 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: Starting in background the rollback of uncommitted transactions 
140129 9:22:51 InnoDB: Rolling back trx with id 2948FA, 6 rows to undo 
140129 9:22:51 InnoDB: Waiting for the background threads to start 
               InnoDB: Rolling back of trx id 2948FA completed 
140129 9:22:51 InnoDB: Rolling back trx with id 2948F9, 5 rows to undo 
               InnoDB: Rolling back of trx id 2948F9 completed 
140129 9:22:51 InnoDB: Rolling back trx with id 2948D6, 4 rows to undo 
               InnoDB: Rolling back of trx id 2948D6 completed 
140129 9:22:51 InnoDB: Rollback of non-prepared transactions completed 
140129 9:22:52 InnoDB: 1.1.8 started; log sequence number 275341421 
140129 9:22:52 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306 
140129 9:22:52 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 
140129 9:22:52 [Note] Server socket created on IP: '0.0.0.0'. 
140129 9:22:52 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and should be repaired 
140129 9:22:52 [Warning] Checking table: './mysql/user' 
140129 9:22:52 [ERROR] 1 client is using or hasn't closed the table properly 
140129 9:22:52 [Note] Event Scheduler: Loaded 0 events 
140129 9:22:52 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.5.29-0ubuntu0.12.04.2' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu) 
140129 9:22:56 [ERROR] /usr/sbin/mysqld: Table './sarojini/wp_options' is marked as crashed and should be repaired 
140129 9:22:56 [Warning] Checking table: './sarojini/wp_options' 
140129 9:22:57 [ERROR] /usr/sbin/mysqld: Table './sysvine/wp_sysvinewpoptions' is marked as crashed and should be repaired 
140129 9:22:57 [Warning] Checking table: './sysvine/wp_sysvinewpoptions' 
140129 13:00:37 [Note] /usr/sbin/mysqld: Normal shutdown 
140129 13:00:37 [Note] Event Scheduler: Purging the queue. 0 events' 
140129 13:00:39 InnoDB: Starting shutdown... 
140129 13:00:40 InnoDB: Waiting for 20 pages to be flushed 
140129 13:00:40 InnoDB: Shutdown completed; log sequence number 277454104 
140129 13:00:41 [Note] /usr/sbin/mysqld: Shutdown complete 
140129 13:01:52 [Note] Plugin 'FEDERATED' is disabled. 
140129 13:01:52 InnoDB: The InnoDB memory heap is disabled 
140129 13:01:52 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
140129 13:01:52 InnoDB: Compressed tables use zlib 1.2.3.4 
140129 13:01:52 InnoDB: Initializing buffer pool, size = 128.0M 
140129 13:01:53 InnoDB: Completed initialization of buffer pool 
140129 13:01:53 InnoDB: highest supported file format is Barracuda. 
140129 13:01:53 InnoDB: Waiting for the background threads to start 
140129 13:01:54 InnoDB: 1.1.8 started; log sequence number 277454104 
140129 13:01:54 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306 
140129 13:01:54 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 
140129 13:01:54 [Note] Server socket created on IP: '0.0.0.0'. 
140129 13:01:55 [Note] Event Scheduler: Loaded 0 events 
140129 13:01:55 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.5.29-0ubuntu0.12.04.2' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu) 
140129 13:19:51 [Note] /usr/sbin/mysqld: Normal shutdown 
140129 13:19:51 [Note] Event Scheduler: Purging the queue. 0 events 
140129 13:19:53 [Warning] /usr/sbin/mysqld: Forcing close of thread 105 user: 'redmine' 
140129 13:19:53 InnoDB: Starting shutdown... 
140129 13:19:54 InnoDB: Shutdown completed; log sequence number 277619754 
140129 13:19:54 [Note] /usr/sbin/mysqld: Shutdown complete

谁能帮我阻止这个不必要的 Innodb 崩溃。

在此先感谢...

【问题讨论】:

  • 这个问题更适合 dba.stackexchange.com。那里的人绝对可以帮助你。万事如意!
  • 您能否尝试以更好的格式重新上传您的日志文件?
  • 编辑完成后,我修复了日志格式。

标签: mysql innodb


【解决方案1】:

日志表明 MySQL 没有正确关闭,但它恢复得很好(9:22:52)。它后来被正确关闭(13:00:3713:19:51)。是什么让你觉得它崩溃了?

【讨论】:

  • MySQL 经常像这样自动关闭和恢复,我需要停止。我不明白为什么 MySQL 会自行关闭和恢复。请探讨造成这种情况的可能原因。我将在 dba.stackexchange.com 上发帖。在此先感谢...
【解决方案2】:

发生崩溃,然后正常关机。

可能它分配了太多的内存。可能 SELinux 或 App Armor 会关闭 MySQL。

【讨论】:

    猜你喜欢
    • 2014-11-17
    • 2014-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-05
    • 2013-08-10
    相关资源
    最近更新 更多