Fault case: problems that may be caused by regular backup and fault case backup

Source: Internet
Author: User

Fault case: problems that may be caused by regular backup and fault case backup

Scenario 1: The database memory is 1.5 GB, with few businesses. The qps is less than 10 at ordinary times. The memory usage soared to 100% from to every morning. When the memory is 100%, the qps surge to 20, cpu usage also surges


Solution

1. Check that the buffer pool size is 900 MB.

Mysql> show variables like '% innodb_buffer_pool_size % ';
+ ------------------------- + ----------- +
| Variable_name | Value |
+ ------------------------- + ----------- +
| Innodb_buffer_pool_size | 943718400 |
+ ------------------------- + ----------- +
1 row in set (0.00 sec)

2. Check the buffer pool usage show engine innodb status. Check that the remaining value is 41226*16/1024 = 644 M.

Buffer pool size 57599
Free buffers 41226
Database pages 16326
Old database pages 6040
Modified db pages 13

3. for periodic reasons, check the scheduled backup time and find that the start time is exactly pm. Check that it is caused by db Backup.

Backup_count: 7
Backup_begintime: 5
Backup_duration: 24
Manual_backup_count: 3

4 because there is a flush tables with read lock operation before mysqldump to record the current state of show master status. If there is a query, this operation will be executed only after all the current queries are completed. The memory is small. We recommend that you upgrade the memory to optimize slow queries.


Scenario 2: When the master database is located at every day, the number of connections suddenly surges from 600 to more than 1200, and many slow queries are accumulated for several hours. Other monitoring parameters are normal.


Solution

1 check that the slow query at that time was some simple SQL statements, and the SQL statement itself does not have a problem

2. Check that the backup time of the master database is a.m.. It is determined that the backup was caused by regular backup.

3 because the slave database exists, the regular backup will be moved to the slave database to solve the problem, mysqldump -- dump-slave = 2


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

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.