How to adjust inotify instances limit?

Q: I get new error in logs.

Apr 10 08:50:26 imap( Warning: Inotify instance limit for user 5000 (UID vmail) exceeded, disabling. Increase /proc/sys/fs/inotify/max_user_instances

How we get solutions on this ?

A: Now we have:

[root@mail ~]# cat /proc/sys/fs/inotify/max_user_instances

Imap connections are:

[root@mail ~]# ss -tnp state established src \*:993 ‘||’ src \*:143 | wc -l

We have to increase the maximum number of instances:

echo "fs.inotify.max_user_instances = 1024" >>/etc/sysctl.conf
sysctl -p

Enjoy, that it is!