Gentoo Archives: gentoo-user

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

Replies

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