Gentoo Archives: gentoo-user

From: covici@××××××××××.com
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] dovecot + inotify max_user instances
Date: Mon, 06 Jan 2014 19:54:10
Message-Id: 5039.1389038033@ccs.covici.com
In Reply to: Re: [gentoo-user] dovecot + inotify max_user instances by Alan McKinnon
1 Alan McKinnon <alan.mckinnon@×××××.com> wrote:
2
3 > On 06/01/2014 20:50, Tanstaafl wrote:
4 > > Hello,
5 > >
6 > > Last year Timo (the dovecot author) remoted into our server and migrated
7 > > us from courier-imap to dovecot. One of the things we ran into
8 > > afterwards was this warning in the logs:
9 > >
10 > >> Warning: Inotify instance limit for user 200 (UID vmail) exceeded,
11 > >> disabling. Increase /proc/sys/fs/inotify/max_user_instances
12 > >
13 > > He solved it by doing:
14 > >
15 > > echo 1024 > /proc/sys/fs/inotify/max_user_instances
16 > >
17 > > Then he said he was going to solve this permanently by changing the init
18 > > script...
19 > >
20 > > Well, my shiny new server encountered the same issue once it went under
21 > > load this morning, so I had to dig out this solution - but obviously
22 > > this will come back again the next time I reboot, so I want to find a
23 > > permanent solution.
24 > >
25 > > I guess I could manually modify my init script, but I'm clueless as to
26 > > where or how.
27 > >
28 > > If someone can help me figure out how to do this, I'll go open a bug to
29 > > get this added to the gentoo init script permanently.
30 >
31 > [snip]
32 >
33 > There's a more generic solution that doesn't involve hacking the init
34 > script. Not all dovecot users will appreciate such a change be put on
35 > their systems and that kind of config is best left up to the individual
36 > sysadmin to determine what suits them best (no single value satisfies
37 > everyone).
38 >
39 > Instead, add that echo statement to a file in /etc/local.d/ and add the
40 > local service to your default runlevel. It will tweak the
41 > max_user_instances knob for you when it runs, same with all such local
42 > knob fiddling you do to optimize performance.
43 >
44 > I think overall this is better than hacking around in dovecot's start-up
45 > script (a rather unsuitable place for it imho)
46
47 I put such a thing in /etc/sysctl.conf like this -- I don't have
48 dovecot, but I needed it for crashplan
49 fs.inotify.max_user_watches=1000000
50 or whatever value suits.
51
52 --
53 Your life is like a penny. You're going to lose it. The question is:
54 How do
55 you spend it?
56
57 John Covici
58 covici@××××××××××.com

Replies

Subject Author
Re: [gentoo-user] dovecot + inotify max_user instances Alan McKinnon <alan.mckinnon@×××××.com>
Re: [gentoo-user] dovecot + inotify max_user instances Tanstaafl <tanstaafl@×××××××××××.org>