Hung_task_timeout_secs and blocked for more than seconds

Source: Internet
Author: User

 

Https://help.aliyun.com/knowledge_detail/41544.html

problem Phenomenon

Cloud Server ECS Linux system is not responding. A large number of error messages similar to the following appear in the/var/log/message log:

    1. echo 0 > /proc/sys/kernel/hung_task_timeout_secs disables this message.
    2. blocked for more than 120 seconds

As shown in the following:

cause of the problem

By default, Linux uses up to 40% of the available memory as the file system cache. When this threshold is exceeded, the file system writes all of the memory in the cache to disk, causing subsequent IO requests to be synchronized.

When the cache is written to disk, there is a default time-out of 120 seconds. The above problem occurs because the IO subsystem is not processing fast enough to write all of the data in the cache to disk in 120 seconds.

The IO system responds slowly, causing more and more requests to accumulate and eventually system memory to be consumed, causing the system to lose its response.

Processing Methods

According to the application situation, the Vm.dirty_ratio,vm.dirty_background_ratio two parameters to tune the settings. For example, the following settings are recommended:

    1. # sysctl -w vm.dirty_ratio=10
    2. # sysctl -w vm.dirty_background_ratio=5
    3. # sysctl -p

If the system is permanently active, modify the/etc/sysctl.conf file. Add the following two lines:

    1. #vi /etc/sysctl.conf
    2. vm.dirty_background_ratio = 5
    3. vm.dirty_ratio = 10

Restart the system to take effect.

Hung_task_timeout_secs and blocked for more than seconds

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.