Mailcow-dockerized: Inotify instance limit for user 5000 (UID vmail) exceeded, disabling

Created on 12 Jul 2017  路  1Comment  路  Source: mailcow/mailcow-dockerized

I have a Mailcow server which only has around 30 mailboxes on it at the moment and some users (an organisation which uses Thunderbird) have been complaining that they are getting "unable to connect to your IMAP server, maximum number of connections exceeded messages", in the dovecot-mailcow logs there are over 100 lines like this:

dovecot-mailcow_1    | Jul 11 12:16:31 webarch dovecot: imap([email protected]): Warning: Inotify instance limit for user 5000 (UID vmail) exceeded, disabling. Increase /proc/sys/fs/inotify/max_user_instances

I found this thread which suggests:

Please append settings below in /etc/sysctl.conf:

fs.inotify.max_user_instances=256
fs.inotify.max_user_watches=256

Then run command sysctl -p to load new settings.

It appears that the current value is 128:

docker-compose exec dovecot-mailcow bash
cat /proc/sys/fs/inotify/max_user_instances 
128

The container doesn't have a /etc/sysctl.conf, how best to increase this in a persistent manner?

Most helpful comment

Thanks to @andryyy helping out in IRC this has been addressed by adding the following to /etc/sysctl.conf on the host server:

fs.inotify.max_user_watches = 4096
fs.inotify.max_user_instances = 4096

Checking it with:

sysctl -p
fs.inotify.max_user_watches = 4096
fs.inotify.max_user_instances = 4096

And restarting the Dovecot container and checking it there:

docker-compose restart dovecot-mailcow
docker-compose exec dovecot-mailcow bash
cat /proc/sys/fs/inotify/max_user_instances 
4096
cat /proc/sys/fs/inotify/max_user_watches   
4096
exit

I wonder if this would be worth adding to the common problems page, or somewhere else in the docs?

>All comments

Thanks to @andryyy helping out in IRC this has been addressed by adding the following to /etc/sysctl.conf on the host server:

fs.inotify.max_user_watches = 4096
fs.inotify.max_user_instances = 4096

Checking it with:

sysctl -p
fs.inotify.max_user_watches = 4096
fs.inotify.max_user_instances = 4096

And restarting the Dovecot container and checking it there:

docker-compose restart dovecot-mailcow
docker-compose exec dovecot-mailcow bash
cat /proc/sys/fs/inotify/max_user_instances 
4096
cat /proc/sys/fs/inotify/max_user_watches   
4096
exit

I wonder if this would be worth adding to the common problems page, or somewhere else in the docs?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CrAazZyMaN21 picture CrAazZyMaN21  路  3Comments

zkryakgul picture zkryakgul  路  3Comments

RogerSik picture RogerSik  路  3Comments

thannaske picture thannaske  路  3Comments

schoebelh picture schoebelh  路  3Comments