Resolving dovecot indexing issue due to large inbox

Post Reply
User avatar
isscbta
Team Member
Posts: 154
Joined: Mon Jul 19, 2021 1:41 am
Has thanked: 18 times
Been thanked: 3 times

In this post, we are addressing a common issue that arises when an inbox contains hundreds of thousands of emails. The problem manifests itself as Dovecot encounters difficulties due to insufficient RAM allocated for indexing. This post aims to provide a solution to this problem and optimize Dovecot's performance by granting it additional RAM for indexing purposes.

Run:

Code: Select all

grep 'Cannot allocate memory' /var/log/dovecot.log
If output is something like:

Code: Select all

... Error: mmap failed with file ... dovecot.index.cache: Cannot allocate memory
Then, to fix this, in your SSH, as root, run:

Code: Select all

sed -i "1s|^|default_vsz_limit = 1024M\n|" /etc/dovecot/conf.d/10-master.conf
systemctl restart dovecot

Tags:
Post Reply