Dovecot vsz_limit

Discussion in 'Installation/Configuration' started by JohnEdward, Jan 28, 2023.

  1. JohnEdward

    JohnEdward New Member

    I have the following error in mail.log:
    Fatal: block_alloc(8388608): Out of memory
    Error: Raw backtrace: /usr/lib/dovecot/ [0x7f87ab9c54e2] -> /usr/lib/dovecot/ [0x7f87ab9c55fe] -> /usr/lib/dovecot/ [0x7f87ab9d149b] -> /usr/lib/dovecot/ [0x7f87ab9d1531] -> /usr/lib/dovecot/ [0x7f87ab928cd8] -> /usr/lib/dovecot/ [0x7f87ab92cf3d] -> /usr/lib/dovecot/ [0x7f87ab9f04ac] -> /usr/lib/dovecot/ [0x7f87aba0435c] -> /usr/lib/dovecot/ [0x7f87abb2616d] -> /usr/lib/dovecot/ [0x7f87abb26e3a] -> /usr/lib/dovecot/ [0x7f87abb27016] -> /usr/lib/dovecot/ [0x7f87abb2340c] -> /usr/lib/dovecot/ [0x7f87abb238ec] -> /usr/lib/dovecot/ [0x7f87abb23cdb] -> /usr/lib/dovecot/ [0x7f87abaf7e68] -> dovecot/imap(imap_sync_init+0x8b) [0x55b0adc2c25b] -> dovecot/imap(+0x15c13) [0x55b0adc15c13] -> dovecot/imap(+0x15e6d) [0x55b0adc15e6d] -> /usr/lib/dovecot/ [0x7f87ab9e6dcb] -> /usr/lib/dovecot/ [0x7f87ab9e8528] -> /usr/lib/dovecot/ [0x7f87ab9e7000] -> /usr/lib/dovecot/ [0x7f87ab9e71c0] -> /usr/lib/dovecot/ [0x7f87ab95d4e3] -> dovecot/imap(main+0x496) [0x55b0adc10e76] -> /lib/x86_64-linux-gnu/ [0x7f87ab718d0a] -> dovecot/imap(_start+0x2a) [0x55b0adc10f1a]
    Fatal: master: service(imap): child 3101759 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)

    more briefly is vsz_limit=256 MB only

    I want to increase to vsz_limit=512 MB in /etc/dovecot/dovecot.conf ,
    but i want to do it in a way that i don't break something else or, to be overwritten by ispconfig.

    I need correct and exact details to do this from you.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Create a new file (if it does not exist):


    and add your custom configuration there. Then restart Dovecot.
    JohnEdward likes this.
  3. JohnEdward

    JohnEdward New Member

    Thanks for the reply. Can you give me an example of a config?
    It is about an error in the boss's mailbox only .
    There are no problems with the other users/mail boxes
    But to the boss...:
    /var/vmail/ourdomain.tld/boss/Maildir/dovecot.index.cache is 223.538 KB

    I don't want to cause even the slightest disturbance in operation.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I never had that error and never used that config option you mentioned on any system. You asked where to put custom config so that it does not get overwritten and I explained where to put it.
    JohnEdward likes this.
  5. JohnEdward

    JohnEdward New Member

    I haven't found a template example anywhere, about how this dovecot_custom.conf.master or that file 99-ispconfig-custom-config.conf should look.
    ...."to prevent insecure/broken systems." ...
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Build a test system where you can experiment with settings before changing configuration on production systems.
    JohnEdward likes this.
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    I just reread my post and nowhere find there that I told you that you need any kind of template. I explained to create a new file and put your custom config there, no mention of any template anywhere in my post, so not sure where you found the word template in post #2. So if I understand you correctly now, you are new to Linux and don't know how to create or edit files on Linux? Have a look at these guide, which explain to you how to create a text file on Linux on the command line:

    The post from @Th0m you cited is about a different method used in old ISPConfig versions before the override file I told you to use existed. This old method is still used sometimes, but only in case a config can not be overridden. the templates for using the old method, which normally should not be used for dovecot anymore, are in the install/tpl/ folder of the ISPConfig tar.gz file.
    JohnEdward likes this.
  8. JohnEdward

    JohnEdward New Member

    A good advice. I thought about this option. Thanks for the answer and the advice.

    I asked you if you have a template, because it would be easier for me to compare and adapt one as an example.'s been about 16 years since I used linux.
    Obviously I can't compare myself to your level, but I think I'm above average.
    I understand that editing is one thing and creating is another, as long as you haven't seen something in comparison and have no idea how it should look.
    Thank you once again for your time and effort in trying to help me.[/QUOTE]
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Sure, if you like to get a template for an empty file, then I can provide you with that. Please find attached to this post an empty file.

    The next steps are:

    1) Copy empty_file.txt to your server into the folder /etc/dovecot/conf.d/
    2) Rename the file /etc/dovecot/conf.d/empty_file.txt to /etc/dovecot/conf.d/99-ispconfig-custom-config.conf
    3) Start editing it and add the configuration options you like to be in this file according to the suggestions you found on the internet regarding this issue.

    But personally, I won't use a template to create empty files, I would just run as root user:

    nano /etc/dovecot/conf.d/99-ispconfig-custom-config.conf
    and start adding the config line, which you found on the internet yourself and like to be included in the dovecot config, to override the default config.

    Attached Files:

    JohnEdward likes this.
  10. JohnEdward

    JohnEdward New Member

    :):D :rolleyes: I don't give likes for an empty file.
    You know I had a good laugh at this joke. :D;)

    I created the file my way:
    touch /etc/dovecot/conf.d/99-ispconfig-custom-config.conf
    In which i threw various variants of configurations, but after several tests, i chose only these (from /etc/dovecot/conf.d/10-master.conf):
    # Default VSZ (virtual memory size) limit for service processes. This is mainly
    # intended to catch and kill processes that leak memory before they eat up
    # everything.
    service imap {
      # Most of the memory goes to mmap()ing files. You may need to increase this
      # limit if you have huge mailboxes.
      vsz_limit = 512M
      # Max. number of IMAP processes (connections)
      process_limit = 1024

    I will monitor the logs to see if the problem persists...
    ahrasis and till like this.
  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    ahrasis and JohnEdward like this.

Share This Page