Innodb:which exceeds the log group capacity

Source: Internet
Author: User
Tags variable scope

Sometimes you will encounter errors similar to the following:

120414  2:20:34  InnoDB:ERROR:the age of the last checkpoint is 241588252,
Innodb:which exceeds the log group Capacity 241588224.
Innodb:if you are using a big BLOB or TEXT rows, you must set the   
innodb:combined size of log files at least Bigger than the
innodb:largest such row.

The reason for this error:

There are larger things in the system, but the innodb_log_file_size settings are too small.

Workaround:

Increase the redo log size.

01) Modify MY.CNF

This needs to be adjusted according to the actual situation. Here's an example

[Mysqld]
Innodb_log_buffer_size          = 32M
innodb_buffer_pool_size         = 3G
innodb_log_file_size            = 768M

Note: Innodb_log_file_size is 5M by default at 5.5 and 48M by default at 5.7. and must be greater than 4M, less than innodb_buffer_pool_size/n (this N is the number of logs in a log group).

and Innodb_log_file_size * Innodb_log_files_in_group cannot be greater than 512G

The aim here is to increase, innodb_log_file_size, but also to consider the effects of innodb_buffer_pool_size.
02) Set Innodb_fast_shutdown

mysql> SET GLOBAL innodb_fast_shutdown = 0;

Setting the Innodb_fast_shutdown to 0 before turning off the data is a complete clean shutdown of the database, and you can look at the following explanations for Innodb_fast_shutdown.

03) Close the database

   Service MySQL Stop
04) Delete the current redo file (ib_logfile*)
05) Start the database

Service MySQL Start


5.7 Official documents:

Innodb_log_file_size

Command-Line Format --innodb_log_file_size=#
System Variable Name Innodb_log_file_size
Variable Scope Global
Dynamic Variable No
Permitted Values (<= 5.7.10) Type Integer
Default 50331648
Min Value 1048576
Max Value 512gb/innodb_log_files_in_group
Permitted Values (>= 5.7.11) Type Integer
Default 50331648
Min Value 4194304
Max Value 512gb/innodb_log_files_in_group

The size in bytes of each log file in a log group. The combined size of log files (Innodb_log_file_size * innodb_log_files_in_group) cannot exceed a maximum value is SL ightly less than 512GB. A pair of 255 GB log files, for example, would allow your to approach the limit but not exceed it. The default value is 48MB. Sensible values range from 4MB to 1/n-th of the size of the buffer pool, where N was the number of log files in the group. The larger the value, the less checkpoint flush activity are needed in the buffer pool, saving disk I/O. Larger log files A LSO make crash recovery slower, although improvements to recovery performance into MySQL 5.5 and higher make the log file Si Ze less of a consideration. For the general I/O tuning advice, the "Optimizing InnoDB Disk I/o" is 9.5.8.

Innodb_fast_shutdown

Command-Line Format --innodb_fast_shutdown[=#]
System Variable Name Innodb_fast_shutdown
Variable Scope Global
Dynamic Variable Yes
Permitted Values Type Integer
Default 1
Valid Values 0
1
2

The InnoDB shutdown mode. If The value is 0, InnoDB does a slow shutdown, a full purge and a change buffer merge before shutting down. If the value is 1 (the default), InnoDB skips are operations at shutdown, a process known as a fast shutdown. If the value is 2,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.