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/libdovecot.so.0(+0x7bae2) [0x7f15a0c32ae2] -> /usr/lib/dovecot/libdovecot.so.0(+0x7bbcd) [0x7f15a0c32bcd] -> /usr/lib/dovecot/libdovecot.so.0(i_error+0) [0x7f15a0bd6ca0] -> /usr/lib/dovecot/libdovecot.so.0(+0x952e4) [0x7f15a0c4c2e4] -> /usr/lib/dovecot/libdovecot.so.0(+0x95320) [0x7f15a0c4c320] -> /usr/lib/dovecot/libdovecot.so.0(p_strdup+0x28) [0x7f15a0c5b4b8] -> /usr/lib/dovecot/libdovecot-storage.so.0(maildir_uidlist_sync_next_uid+0xea) [0x7f15a0f1693a] -> /usr/lib/dovecot/libdovecot-storage.so.0(maildir_uidlist_sync_next+0x20) [0x7f15a0f16d80] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x6135f) [0x7f15a0f1435f] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x62138) [0x7f15a0f15138] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x62442) [0x7f15a0f15442] -> /usr/lib/dovecot/libdovecot-storage.so.0(maildir_storage_sync_init+0xb9) [0x7f15a0f157a9] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x3b) [0x7f15a0ee987b] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_sync+0x37) [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/libdovecot.so.0(io_loop_call_io+0x4c) [0x7f15a0c4686c] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x101) [0x7f15a0c47d01] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x25) [0x7f15a0c468f5] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7f15a0c46a98] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7f15a0bdc643] -> dovecot/imap(main+0x328) [0x560cb58aad08] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [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