更改innodb_log_file_size, 解決InnoDB: ERROR: the ag...的問題

在批量更新數據的時候,mysqld.err中多次出現了:
130701 11:53:42  InnoDB: ERROR: the age of the last checkpoint is 2863227109,
InnoDB: which exceeds the log group capacity 566225511.
InnoDB: If you are using big BLOB or TEXT rows, you must set the
InnoDB: combined size of log files at least 10 times bigger than the
 
查看show engine innodb status \G
---
LOG
---
Log sequence number 35 1084195310
Log flushed up to   35 1082093330
Last checkpoint at  34 2875247845
0 pending log writes, 0 pending chkp writes
175831373 log i/o's done, 5.55 log i/o's/second
 
發現Log flushed up跟Last checkpoint 確實相差比較大,在redo log 中的capacity變量,代表最後的checkpoint不能超過這個閥值;若超過這個閥值則需將innodb buffer pool 中的髒數據寫回到磁盤。
 
只是偶爾出現一次這類告警,不調整my.cnf參數也可以;若經常出現這類告警,可以將innodb_log_file_size參數調大。
 
innodb_log_file_size 參數的調整需重啓數據庫,對於生產線的數據庫需選擇好重啓的時機,調整時如下操作:
1.停止mysql;
2.修改my.cnf中的innodb_log_file_size參數的大小;
3.將ib_logfile* 的文件移至其他目錄(在正常關閉的情況下可以直接刪除,最好還是移至其他目錄,若mysql正常啓動後再刪除也不遲);
4.啓動mysql,檢查啓動是否正常。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章