Symptoms
-
Unable to read mail in Horde/Roundcube:
IMAP error reported by server
external ERROR
Could not load message from server -
The following errors appear in
/var/log/maillog
:dovecot: service=imap, [email protected], ip=[127.0.0.1]. Fatal: master: service(imap): child 688159 returned error 83 (Out of memory (service imap { vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1 environment to get core dump)
Error: mmap(size=0) failed with file /var/qmail/mailnames/example.com/user/Maildir/dovecot.index.cache: Cannot allocate memory
Cause
The maximum limit for Dovecot process address space was exceeded.
The size of the file /var/qmail/mailnames/example.com/user/Maildir/dovecot.index.cache
is more than the default "vsz_limit" value:
# ls -alh /var/qmail/mailnames/example.com/user/Maildir/dovecot.index.cache
-rw------- 1 popuser popuser 500M Feb 27 11:21 /var/qmail/mailnames/example.com/user/Maildir/dovecot.index.cache
# doveconf | grep default_vsz_limit
default_vsz_limit = 256 M
Resolution
Note: if you don't have root access to Plesk via SSH, contact your hosting provider regarding the issue
-
Connect to Plesk server via SSH;
- Open file in any text editor and Increase
vsz_limit
value in the dovecot configuration (if the file does not exist, create it and insert the content below):# vi /etc/dovecot/conf.d/99-vsz.conf
service imap {
vsz_limit = 1 G
}default_vsz_limit = 1 G
-
Reload Dovecot:
# systemctl reload dovecot.service