INotify error failed to watch/opt; Brother/proc/sys/fs/inotify/max_user_watches,k

Source: Internet
Author: User
Tags inotify

2016.11.8


Brother K has 2 servers using the Unison+inotify to reach the site folder synchronization effect

Today suddenly found that inotify occupy a large CPU, you can use the top command to view

Open the INotify log to see why


Find this error

Failed to Watch/opt; Upper limit on inotify watches reached!
Please increase the amount of inotify watches allowed per user via '/proc/sys/fs/inotify/max_user_watches '.


The main idea: inotify the number of default monitoring synchronization files is limited, 8192, through the configuration file/proc/sys/fs/inotify/max_user_watches can adjust the number of monitoring

My problem is obviously that the file is increasing, which makes it impossible to monitor more files.


Cat this file, the default value is 8192,

echo 8192000 >>/proc/sys/fs/inotify/max_user_watches


Finally, there is a little hint, 2 servers, this setting not the same

It's better to be a little bigger, another small one, like 8200000.


If set to the same, it is likely to cause 2 server CPUs to rise at the same time, leading to business terminal, Brother K

This article is from the "kevinzhang91" blog, make sure to keep this source http://kevinzhang91.blog.51cto.com/12012510/1870596

INotify error failed to watch/opt; Brother/proc/sys/fs/inotify/max_user_watches,k

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.