Imap Out of Memory

NethServer 7rc:

Hi, I cant not migrate inbox mail but the rest is sync. (200gB)
Oct 26 22:44:09 svc dovecot: imap( Error: Raw backtrace: /usr/lib64/dovecot/ [0x7f5bc6f4006e] -> /usr/lib64/dovecot/ [0x7f5bc6f4014e] -> /usr/lib64/dovecot/ [0x7f5bc6ef86a2] -> /usr/lib64/dovecot/ [0x7f5bc6f551a8] -> /usr/lib64/dovecot/ [0x7f5bc6f551df] -> /usr/lib64/dovecot/ [0x7f5bc6f62378] -> /usr/lib64/dovecot/ [0x7f5bc72003bc] -> /usr/lib64/dovecot/ [0x7f5bc7200b8e] -> /usr/lib64/dovecot/ [0x7f5bc7200c04] -> /usr/lib64/dovecot/ [0x7f5bc71fbb30] -> /usr/lib64/dovecot/ [0x7f5bc71f6081] -> /usr/lib64/dovecot/ [0x7f5bc71f6500] -> /usr/lib64/dovecot/ [0x7f5bc71f6bdc] -> /usr/lib64/dovecot/ [0x7f5bc7248699] -> /usr/lib64/dovecot/ [0x7f5bc724ab13] -> /usr/lib64/dovecot/ [0x7f5bc725178b] -> /usr/lib64/dovecot/ [0x7f5bc7251eb4] -> /usr/lib64/dovecot/ [0x7f5bc722b46f] -> /usr/lib64/dovecot/ [0x7f5bc722b4dd] -> dovecot/imap(+0x1a874) [0x7f5bc7708874] -> dovecot/imap(imap_fetch_more+0x32) [0x7f5bc7709852] -> dovecot/imap(cmd_fetch+0x33d) [0x7f5bc76fd17d] -> dovecot/imap(command_exec+0x3c) [0x7f5bc770701c] -> dovecot/imap(+0x17f1f) [0x7f5bc7705f1f] -> dovecot/imap(+0x18005) [0x7f5bc7706005] -> dovecot/imap(client_handle_input+0x14d) [0x7f5bc77062fd] -> dovecot/imap(client_input+0x85) [0x7f5bc77066c5] -> /usr/lib64/dovecot/ [0x7f5bc6f50a87] Oct 26 22:44:09 svc dovecot: imap( Fatal: master: service(imap): child 11803 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)

The log message is clear!

How much physical RAM does your system have? Are you running mail-filter services, too?

Maybe you can try to increase vsz_limit in dovecot configuration.

Hi I have on my server 8gb ram but i don’t see in /etc/dovecot/dovecot.conf the line vsz_limit or i need add.

Try to add the line by hand. If it fixes the problem, we see how to make the change persistent!

Please have a look at “doveconf” command and its man page!

For now i just add 1024MB and its working fine.

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


To make it persistent you need a custom template, a file containing the lines above in the right place.

In your case create that file like


Then run

expand-template /etc/dovecot/dovecot.conf

You should see your vsz_limit directive at the end of /etc/dovecot/dovecot.conf. Verify it is parsed correctly by runnint doveconf -n.


I encountered the same problem. @davidep, when I add the configuration lines in the custom template,

The system answers with this :

expand-template /etc/dovecot/dovecot.conf
WARNING in /etc/e-smith/templates-custom//etc/dovecot/dovecot.conf/90myvszlimit: Unquoted string "executable" may clash with future reserved word at /etc/e-smith/templates-custom//etc/dovecot/dovecot.conf/90myvszlimit line 2.
WARNING in /etc/e-smith/templates-custom//etc/dovecot/dovecot.conf/90myvszlimit: Bareword found where operator expected at /etc/e-smith/templates-custom//etc/dovecot/dovecot.conf/90myvszlimit line 3, near "1024MB"
WARNING in /etc/e-smith/templates-custom//etc/dovecot/dovecot.conf/90myvszlimit:        (Missing operator before MB?)
ERROR in /etc/e-smith/templates-custom//etc/dovecot/dovecot.conf/90myvszlimit: Program fragment delivered error <<Can't modify negation (-) in scalar assignment at /etc/e-smith/templates-custom//etc/dovecot/dovecot.conf/90myvszlimit line 4, near "1024MB
syntax error at /etc/e-smith/templates-custom//etc/dovecot/dovecot.conf/90myvszlimit line 4, near "1024MB
">> at template line 1
ERROR: Template processing failed for //etc/dovecot/dovecot.conf: 3 fragments generated warnings, 1 fragment generated errors
 at /sbin/e-smith/expand-template line 45.

What should I do ?

The template processor requires that curly braces are properly escaped: { becomes \{ and } becomes \}.

See for instance this custom template for dovecot:


Working. Txs !

1 Like

2 posts were split to a new topic: Set Dovecot vsz_limit with a prop