Alan McKinnon <alan.mckin...@gmail.com> wrote:

> On 06/01/2014 20:50, Tanstaafl wrote:
> > Hello,
> > 
> > Last year Timo (the dovecot author) remoted into our server and migrated
> > us from courier-imap to dovecot. One of the things we ran into
> > afterwards was this warning in the logs:
> > 
> >> Warning: Inotify instance limit for user 200 (UID vmail) exceeded,
> >> disabling. Increase /proc/sys/fs/inotify/max_user_instances
> > 
> > He solved it by doing:
> > 
> > echo 1024 > /proc/sys/fs/inotify/max_user_instances
> > 
> > Then he said he was going to solve this permanently by changing the init
> > script...
> > 
> > Well, my shiny new server encountered the same issue once it went under
> > load this morning, so I had to dig out this solution - but obviously
> > this will come back again the next time I reboot, so I want to find a
> > permanent solution.
> > 
> > I guess I could manually modify my init script, but I'm clueless as to
> > where or how.
> > 
> > If someone can help me figure out how to do this, I'll go open a bug to
> > get this added to the gentoo init script permanently.
> 
> [snip]
> 
> There's a more generic solution that doesn't involve hacking the init
> script. Not all dovecot users will appreciate such a change be put on
> their systems and that kind of config is best left up to the individual
> sysadmin to determine what suits them best (no single value satisfies
> everyone).
> 
> Instead, add that echo statement to a file in /etc/local.d/ and add the
> local service to your default runlevel. It will tweak the
> max_user_instances knob for you when it runs, same with all such local
> knob fiddling you do to optimize performance.
> 
> I think overall this is better than hacking around in dovecot's start-up
> script (a rather unsuitable place for it imho)

I put such a thing in /etc/sysctl.conf like this -- I don't have
dovecot, but I needed it for crashplan
fs.inotify.max_user_watches=1000000
or whatever value suits.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         cov...@ccs.covici.com

Reply via email to