Get the App
SLTechnology News&Howtos  ›  Database  › 

How does Innodb automatically turn on printing show engine status to err logs

Shulou Source: shulou.com Published: 2022-05-31 18:14:38 09月22日 Update

This article introduces the knowledge of "how Innodb automatically opens printing show engine status to err logs". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

I. description of the problem

Why there are a large number of show engine innodb status records in my err log? I didn't turn on the innodb_status_output parameter myself.

Second, problem analysis

By looking at the log, you can find the following output:

2019-03-21T17:00:02.375231Z 1230497 [Warning] InnoDB: Difficult to find free blocks in the buffer pool (338 search iterations)! 0 failed attempts to flush a page! Consider increasing the buffer pool size. It is also possible that in your Unix version fsync is very slow, or completely frozen inside the OS kernel. Then upgrading to a newer version of your operating system may help. Look at the number of fsyncs in diagnostic info below. Pending flushes (fsync) log: 0; buffer pool: 0. 1446962050 OS file reads, 545881917 OS file writes, 376257282 OS fsyncs. Starting InnoDB Monitor to print further diagnostics to the standard output.

The diary is also very clear. It should be that free block is not enough and Innodb is automatically turned on. But we need source code verification.

III. Source code verification

We see the following in the buf_LRU_handle_lack_of_free_blocks function of the source code:

If ((current_ms > started_ms + 2000) & & (current_ms > last_printout_ms + 2000) & & srv_buf_pool_old_size = = srv_buf_pool_size) {ib::warn ()

Tags: Logs parameters actual source code output content functions in fact more knowledge problems verification practical clear successful learning and then the upper layer not enough at the same time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Apple Microsoft Docker Linux