Articles in this section

Unable to read or see emails in Horde or Roundcube on Plesk for Linux: Cannot allocate memory due to vsz_limit

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Unable to read mail in the Horde or Roundcube webmail clients, while getting errors that are similar to the following within the webmail clients:

    CONFIG_TEXT: IMAP error reported by server

    CONFIG_TEXT: INTERNAL ERROR
    Could not load message from server

  • Opening a folder (such as Junk) in Roundcube webmail results in emails not being listed within it, however the number of pages tied to the folder is being displayed and no errors are popping up
  • Errors that are similar to the following appear in /var/log/maillog:

    CONFIG_TEXT: dovecot[711983]: service=imap, user=user@example.com, ip=[::1]. Fatal: block_alloc(134217728): Out of memory

    CONFIG_TEXT: dovecot: service=imap, user=user@example.com, 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)

    CONFIG_TEXT: Error: mmap(size=0) failed with file /var/qmail/mailnames/example.com/user/Maildir/dovecot.index.cache: Cannot allocate memory

  • Running the systemctl status dovecot command shows output that is similar to the following:

    CONFIG_TEXT: Apr 08 18:08:06 server dovecot[3588064]: master: Error: service(config): command startup failed, throttling for 60.000 secs
    Apr 08 18:08:06 server dovecot[3588173]: config: Fatal: master: service(config): child 3868141 returned error 83 (Out of memory (service config { vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1 environment to get core dump)

Cause

The maximum limit for dovecot process address space (vsz_limit) has been 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

  1. Log into the Plesk server via SSH

  2. Open (or create) the file /etc/dovecot/conf.d/99-vsz.conf with your favorite command-line text editor and increase the vsz_limit value in the dovecot configuration by adjusting the contents as follows:

    CONFIG_TEXT: service imap {
    vsz_limit = 1 G
    }

    default_vsz_limit = 1 G

  3. Reload the dovecot service in order to apply the changes:

    # systemctl reload dovecot

Was this article helpful?

Comments

1 comment
Date Votes
  • Do not include the words CONFIG TEXT. This is what the file contents should look like:

    service imap {
        vsz_limit = 1 G
    }
    
    default_vsz_limit = 1 G
    
    0

Please sign in to leave a comment.