Imap dovecot out of memory

Hoping you guys can help me out. I am new to this current system so any help would be great. I saw a post about this but want to confirm I am in the same situation. I believe I need to increase the vsz_limit but my conf file is pretty empty. I did not set this up.
Would adding this below into the conf file and then restarting dovecot fix this issue? Any help would be appreciated. This is also a failover so wondering if a restart of the server would fix the issue too?

service imap {
executable = imap imap-postlogin
vsz_limit = 1024MB

Error: Raw backtrace: /usr/lib/dovecot/ [0x7f15a0c32ae2] -> /usr/lib/dovecot/ [0x7f15a0c32bcd] -> /usr/lib/dovecot/ [0x7f15a0bd6ca0] -> /usr/lib/dovecot/ [0x7f15a0c4c2e4] -> /usr/lib/dovecot/ [0x7f15a0c4c320] -> /usr/lib/dovecot/ [0x7f15a0c5b4b8] -> /usr/lib/dovecot/ [0x7f15a0f1693a] -> /usr/lib/dovecot/ [0x7f15a0f16d80] -> /usr/lib/dovecot/ [0x7f15a0f1435f] -> /usr/lib/dovecot/ [0x7f15a0f15138] -> /usr/lib/dovecot/ [0x7f15a0f15442] -> /usr/lib/dovecot/ [0x7f15a0f157a9] -> /usr/lib/dovecot/ [0x7f15a0ee987b] -> /usr/lib/dovecot/ [0x7f15a0ee99c7] -> dovecot/imap(cmd_select_full+0x190) [0x560cb58b21a0] -> dovecot/imap(command_exec+0x9c) [0x560cb58b906c] -> dovecot/imap(+0x193e2) [0x560cb58b73e2] -> dovecot/imap(+0x1946c) [0x560cb58b746c] -> dovecot/imap(client_handle_input+0x165) [0x560cb58b7825] -> dovecot/imap(client_input+0x82) [0x560cb58b7db2] -> /usr/lib/dovecot/ [0x7f15a0c4686c] -> /usr/lib/dovecot/ [0x7f15a0c47d01] -> /usr/lib/dovecot/ [0x7f15a0c468f5] -> /usr/lib/dovecot/ [0x7f15a0c46a98] -> /usr/lib/dovecot/ [0x7f15a0bdc643] -> dovecot/imap(main+0x328) [0x560cb58aad08] -> /lib/x86_64-linux-gnu/ [0x7f15a080d830] -> dovecot/imap(_start+0x29) [0x560cb58aae89]
Jun 26 12:47:57 ip-172-31-241-135 dovecot: imap(xxxxxx@xxxxxxxx.netFatal: master: service(imap): child 16630 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)

Use the following command to increase the limit. Please, let us know if it solves the problem.
How many emails are in the mailbox?

mkdir -p /etc/e-smith/templates-custom/etc/dovecot/dovecot.conf
echo "default_vsz_limit = 1024 M" > /etc/e-smith/templates-custom/etc/dovecot/dovecot.conf/90myvszlimit
expand-template /etc/dovecot/dovecot.conf
systemctl restart dovecot
1 Like