1 |
Hello, |
2 |
|
3 |
Last year Timo (the dovecot author) remoted into our server and migrated |
4 |
us from courier-imap to dovecot. One of the things we ran into |
5 |
afterwards was this warning in the logs: |
6 |
|
7 |
> Warning: Inotify instance limit for user 200 (UID vmail) exceeded, disabling. Increase /proc/sys/fs/inotify/max_user_instances |
8 |
|
9 |
He solved it by doing: |
10 |
|
11 |
echo 1024 > /proc/sys/fs/inotify/max_user_instances |
12 |
|
13 |
Then he said he was going to solve this permanently by changing the init |
14 |
script... |
15 |
|
16 |
Well, my shiny new server encountered the same issue once it went under |
17 |
load this morning, so I had to dig out this solution - but obviously |
18 |
this will come back again the next time I reboot, so I want to find a |
19 |
permanent solution. |
20 |
|
21 |
I guess I could manually modify my init script, but I'm clueless as to |
22 |
where or how. |
23 |
|
24 |
If someone can help me figure out how to do this, I'll go open a bug to |
25 |
get this added to the gentoo init script permanently. |
26 |
|
27 |
The current (gentoo) init script is: |
28 |
|
29 |
> #!/sbin/runscript |
30 |
> # Copyright 1999-2012 Gentoo Foundation |
31 |
> # Distributed under the terms of the GNU General Public License, v2 or |
32 |
> later |
33 |
> # $Header: |
34 |
> /var/cvsroot/gentoo-x86/net-mail/dovecot/files/dovecot.init-r4,v 1.1 |
35 |
> 2012/12/01 10:40:49 eras Exp $ |
36 |
> |
37 |
> extra_started_commands="reload" |
38 |
> |
39 |
> depend() { |
40 |
> need localmount |
41 |
> before postfix |
42 |
> after bootmisc ldap mysql ntp-client ntpd postgresql saslauthd |
43 |
> slapd |
44 |
> use logger net |
45 |
> } |
46 |
> |
47 |
> checkconfig() { |
48 |
> DOVECOT_INSTANCE=${SVCNAME##*.} |
49 |
> if [ -n "${DOVECOT_INSTANCE}" -a "${SVCNAME}" != "dovecot" ]; then |
50 |
> DOVECOT_CONF=/etc/dovecot/dovecot.${DOVECOT_INSTANCE}.conf |
51 |
> else |
52 |
> DOVECOT_CONF=/etc/dovecot/dovecot.conf |
53 |
> fi |
54 |
> if [ ! -e ${DOVECOT_CONF} ]; then |
55 |
> eerror "You will need an ${DOVECOT_CONF} first" |
56 |
> return 1 |
57 |
> fi |
58 |
> if [ -x /usr/sbin/dovecot ]; then |
59 |
> DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} |
60 |
> -a | grep '^base_dir = ' | sed 's/^base_dir = //') |
61 |
> else |
62 |
> eerror "dovecot not executable" |
63 |
> return 1 |
64 |
> fi |
65 |
> DOVECOT_BASEDIR=${DOVECOT_BASEDIR:-/var/run/dovecot} |
66 |
> DOVECOT_PIDFILE=${DOVECOT_BASEDIR}/master.pid |
67 |
> } |
68 |
> |
69 |
> start() { |
70 |
> checkconfig || return 1 |
71 |
> ebegin "Starting ${SVCNAME}" |
72 |
> start-stop-daemon --start --exec /usr/sbin/dovecot \ |
73 |
> --pidfile "${DOVECOT_PIDFILE}" -- -c "${DOVECOT_CONF}" |
74 |
> eend $? |
75 |
> } |
76 |
> |
77 |
> stop() { |
78 |
> checkconfig || return 1 |
79 |
> ebegin "Stopping ${SVCNAME}" |
80 |
> start-stop-daemon --stop --exec /usr/sbin/dovecot \ |
81 |
> --pidfile "${DOVECOT_PIDFILE}" |
82 |
> eend $? |
83 |
> } |
84 |
> |
85 |
> reload() { |
86 |
> checkconfig || return 1 |
87 |
> ebegin "Reloading ${SVCNAME} configs and restarting auth/login |
88 |
> processes" |
89 |
> start-stop-daemon --signal HUP --exec /usr/sbin/dovecot \ |
90 |
> --pidfile "${DOVECOT_PIDFILE}" |
91 |
> eend $? |
92 |
> } |
93 |
|
94 |
Thx for any help... |
95 |
|
96 |
Charles |