Fatal: block_alloc(134217728): Out of memory
hey, :)
i have a postfix instance trying to deliver a message to dovecot via lmtp, but fails due to an out-of-memory error in dovecot:
the message is generated by a cron job like a thousand times before, and hundreds of times afterwards. the only thing maybe worth mentioning is its size of ~80MB. but since i don't have any size limits configured, i don't see why it shouldn't be delivered.
any hints are appreciated!
greetings...
# dovecot --version 2.3.21.1 (d492236fa0)
# cat /etc/apt/sources.list.d/dovecot.list #deb http://repo.dovecot.org/ce-2.3-latest/debian/bullseye bullseye main deb https://repo.dovecot.org/ce-2.3-latest/debian/bullseye bullseye main
postfix log: Feb 5 12:21:42 mail01 postfix/qmgr[1175]: B95E360E5C: from=<root@mail01.example.com>, size=85100558, nrcpt=1 (queue active) Feb 5 12:21:43 mail01 postfix/lmtp[3990]: B95E360E5C: to=<root@example.com>, orig_to=<root>, relay=mail01.example.com[private/dovecot-lmtp], delay=3265236, delays=3265235/0.01/0.01/1.1, dsn=4.4.2, status=deferred (lost connection with mail01.example.com[private/dovecot-lmtp] while sending end of data -- message may be sent more than once)
dovecot log: /var/log/dovecot/dovecot-lmtp.log:Feb 05 12:21:43 lmtp(root@example.com)<3991><SEldMcZJo2eXDwAAPczdCw>: Fatal: block_alloc(134217728): Out of memory /var/log/dovecot/dovecot-lmtp.log:Feb 05 12:21:43 lmtp(root@example.com)<3991><SEldMcZJo2eXDwAAPczdCw>: Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x42) [0x7f439cc1e662] -> /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e) [0x7f439cc1e77e] -> /usr/lib/dovecot/libdovecot.so.0(+0x1043db) [0x7f439cc2b3db] -> /usr/lib/dovecot/libdovecot.so.0(+0x104411) [0x7f439cc2b411] -> /usr/lib/dovecot/libdovecot.so.0(+0x5688f) [0x7f439cb7d88f] -> /usr/lib/dovecot/libdovecot.so.0(+0x5ae87) [0x7f439cb81e87] -> /usr/lib/dovecot/libdovecot.so.0(+0x1245ac) [0x7f439cc4b5ac] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x2f524) [0x7f439c30b524] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x307e9) [0x7f439c30c7e9] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_message_body_get_text+0x4a) [0x7f439c30d40a] -> /usr/lib/dovecot/libdovecot-sieve.so.0(ext_body_get_part_list+0x51) [0x7f439c34a3e1] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x6ebc2) [0x7f439c34abc2] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_interpreter_continue+0x9a) [0x7f439c320cda] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_multiscript_run+0x92) [0x7f439c338202] -> /usr/lib/dovecot/modules/lib90_sieve_plugin.so(+0x39ba) [0x7f439c3a99ba] -> /usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver+0x179) [0x7f439ce6f8d9] -> dovecot/lmtp(lmtp_local_default_deliver+0x1d4) [0x55c39e8ec724] -> dovecot/lmtp(lmtp_local_data+0x5ac) [0x55c39e8ece7c] -> dovecot/lmtp(client_default_cmd_data+0x18d) [0x55c39e8eb83d] -> dovecot/lmtp(cmd_data_continue+0x180) [0x55c39e8eb5d0] -> /usr/lib/dovecot/libdovecot.so.0(+0x7628b) [0x7f439cb9d28b] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69) [0x7f439cc41609] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x132) [0x7f439cc42cf2] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x50) [0x7f439cc416b0] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x40) [0x7f439cc41870] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7f439cbb38e3] -> dovecot/lmtp(main+0x22a) [0x55c39e8ea27a] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f439c972d7a] -> dovecot/lmtp(_start+0x2a) [0x55c39e8ea38a]
On 05/02/2025 14:15 EET Michael via dovecot <dovecot@dovecot.org> wrote:
hey, :)
i have a postfix instance trying to deliver a message to dovecot via lmtp, but fails due to an out-of-memory error in dovecot:
the message is generated by a cron job like a thousand times before, and hundreds of times afterwards. the only thing maybe worth mentioning is its size of ~80MB. but since i don't have any size limits configured, i don't see why it shouldn't be delivered.
any hints are appreciated!
greetings...
# dovecot --version 2.3.21.1 (d492236fa0)
# cat /etc/apt/sources.list.d/dovecot.list #deb http://repo.dovecot.org/ce-2.3-latest/debian/bullseye bullseye main deb https://repo.dovecot.org/ce-2.3-latest/debian/bullseye bullseye main
postfix log: Feb 5 12:21:42 mail01 postfix/qmgr[1175]: B95E360E5C: from=<root@mail01.example.com>, size=85100558, nrcpt=1 (queue active) Feb 5 12:21:43 mail01 postfix/lmtp[3990]: B95E360E5C: to=<root@example.com>, orig_to=<root>, relay=mail01.example.com[private/dovecot-lmtp], delay=3265236, delays=3265235/0.01/0.01/1.1, dsn=4.4.2, status=deferred (lost connection with mail01.example.com[private/dovecot-lmtp] while sending end of data -- message may be sent more than once)
Incease vsize limit for LMTP, it needs to be large enough to fit the indexes in mmap'd memory (recommend 2G as that usually works best).
Aki
On Wednesday, February 5, 2025 1:24:31 PM CET, Aki Tuomi via dovecot wrote:
Incease vsize limit for LMTP, it needs to be large enough to fit the indexes in mmap'd memory (recommend 2G as that usually works best).
thanks. the message could be delivered successfully now.
although: i didn't increase vsz_limit for service lmtp { ... }, but i did set default_vsz_limit = 2048 M so, iiuc, all 'vsz_limit's were set do 2G...
i suspect it was not the lmtp service lacking memory, since i succesfully tried to send messages >85MB of size via
mail ... < /file/of/size/bigger/than/85MB
so my guess is, that sieve was the part complaining about too little memory. but i have to investigate further, if i shall ever find the time...
but for now: thank you!
greetings...
Hi Can you send your lmtp config ?
Like:
service lmtp { process_limit = 20 vsz_limit = 512M }
and yours limit via /etc/security/limits.conf
W dniu 5.02.2025 o 13:15, Michael via dovecot pisze:
hey, :)
i have a postfix instance trying to deliver a message to dovecot via lmtp, but fails due to an out-of-memory error in dovecot:
the message is generated by a cron job like a thousand times before, and hundreds of times afterwards. the only thing maybe worth mentioning is its size of ~80MB. but since i don't have any size limits configured, i don't see why it shouldn't be delivered.
any hints are appreciated!
greetings...
# dovecot --version 2.3.21.1 (d492236fa0)
# cat /etc/apt/sources.list.d/dovecot.list #deb http://repo.dovecot.org/ce-2.3-latest/debian/bullseye bullseye main deb https://repo.dovecot.org/ce-2.3-latest/debian/bullseye bullseye main
postfix log: Feb 5 12:21:42 mail01 postfix/qmgr[1175]: B95E360E5C: from=<root@mail01.example.com>, size=85100558, nrcpt=1 (queue active) Feb 5 12:21:43 mail01 postfix/lmtp[3990]: B95E360E5C: to=<root@example.com>, orig_to=<root>, relay=mail01.example.com[private/dovecot-lmtp], delay=3265236, delays=3265235/0.01/0.01/1.1, dsn=4.4.2, status=deferred (lost connection with mail01.example.com[private/dovecot-lmtp] while sending end of data -- message may be sent more than once)
dovecot log: /var/log/dovecot/dovecot-lmtp.log:Feb 05 12:21:43 lmtp(root@example.com)<3991><SEldMcZJo2eXDwAAPczdCw>: Fatal: block_alloc(134217728): Out of memory /var/log/dovecot/dovecot-lmtp.log:Feb 05 12:21:43 lmtp(root@example.com)<3991><SEldMcZJo2eXDwAAPczdCw>: Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x42) [0x7f439cc1e662] -> /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e) [0x7f439cc1e77e] -> /usr/lib/dovecot/libdovecot.so.0(+0x1043db) [0x7f439cc2b3db] -> /usr/lib/dovecot/libdovecot.so.0(+0x104411) [0x7f439cc2b411] -> /usr/lib/dovecot/libdovecot.so.0(+0x5688f) [0x7f439cb7d88f] -> /usr/lib/dovecot/libdovecot.so.0(+0x5ae87) [0x7f439cb81e87] -> /usr/lib/dovecot/libdovecot.so.0(+0x1245ac) [0x7f439cc4b5ac] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x2f524) [0x7f439c30b524] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x307e9) [0x7f439c30c7e9] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_message_body_get_text+0x4a) [0x7f439c30d40a] -> /usr/lib/dovecot/libdovecot-sieve.so.0(ext_body_get_part_list+0x51) [0x7f439c34a3e1] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x6ebc2) [0x7f439c34abc2] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_interpreter_continue+0x9a) [0x7f439c320cda] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_multiscript_run+0x92) [0x7f439c338202] -> /usr/lib/dovecot/modules/lib90_sieve_plugin.so(+0x39ba) [0x7f439c3a99ba] -> /usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver+0x179) [0x7f439ce6f8d9] -> dovecot/lmtp(lmtp_local_default_deliver+0x1d4) [0x55c39e8ec724] -> dovecot/lmtp(lmtp_local_data+0x5ac) [0x55c39e8ece7c] -> dovecot/lmtp(client_default_cmd_data+0x18d) [0x55c39e8eb83d] -> dovecot/lmtp(cmd_data_continue+0x180) [0x55c39e8eb5d0] -> /usr/lib/dovecot/libdovecot.so.0(+0x7628b) [0x7f439cb9d28b] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69) [0x7f439cc41609] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x132) [0x7f439cc42cf2] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x50) [0x7f439cc416b0] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x40) [0x7f439cc41870] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7f439cbb38e3] -> dovecot/lmtp(main+0x22a) [0x55c39e8ea27a] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f439c972d7a] -> dovecot/lmtp(_start+0x2a) [0x55c39e8ea38a]
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
-- Maciej Miłaszewski Starszy Administrator Systemowy
IQ PL Sp. z o.o. ul. Geodetów 16, 80-298 Gdańsk NIP 5832736211
KRS 0000007725, www.iq.pl Sąd rejestrowy: Sąd Rejonowy w Gdańsku VII Wydział KRS, kapitał zakładowy: 140.000 PLN
Dział pomocy: https://www.iq.pl/pomoc
Informacja dotycząca przetwarzania danych osobowych: https://www.iq.pl/obowiazek-informacyjny
Check dovecot service status memory usage and since it was started, if its over available RAM, restarting the service every now and then might fix this, if its below RAM limit, it could be other services leaving dovecot without enough RAM, and if it wasnt a bug or misconfiguration in dovecot performance, refer to https://doc.dovecot.org/2.3/configuration_manual/performance_tuning/, then increasing dovecot service CPU and Memory limit might help.
On 2025-02-05 12:15, Michael via dovecot wrote:
hey, :)
i have a postfix instance trying to deliver a message to dovecot via lmtp, but fails due to an out-of-memory error in dovecot:
the message is generated by a cron job like a thousand times before, and hundreds of times afterwards. the only thing maybe worth mentioning is its size of ~80MB. but since i don't have any size limits configured, i don't see why it shouldn't be delivered.
any hints are appreciated!
greetings...
# dovecot --version 2.3.21.1 (d492236fa0)
# cat /etc/apt/sources.list.d/dovecot.list #deb http://repo.dovecot.org/ce-2.3-latest/debian/bullseye bullseye main deb https://repo.dovecot.org/ce-2.3-latest/debian/bullseye bullseye main
postfix log: Feb 5 12:21:42 mail01 postfix/qmgr[1175]: B95E360E5C: from=, size=85100558, nrcpt=1 (queue active) Feb 5 12:21:43 mail01 postfix/lmtp[3990]: B95E360E5C: to=, orig_to=, relay=mail01.example.com[private/dovecot-lmtp], delay=3265236, delays=3265235/0.01/0.01/1.1, dsn=4.4.2, status=deferred (lost connection with mail01.example.com[private/dovecot-lmtp] while sending end of data -- message may be sent more than once)
dovecot log: /var/log/dovecot/dovecot-lmtp.log:Feb 05 12:21:43 lmtp(root@example.com): Fatal: block_alloc(134217728): Out of memory /var/log/dovecot/dovecot-lmtp.log:Feb 05 12:21:43 lmtp(root@example.com): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x42) [0x7f439cc1e662] -> /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e) [0x7f439cc1e77e] -> /usr/lib/dovecot/libdovecot.so.0(+0x1043db) [0x7f439cc2b3db] -> /usr/lib/dovecot/libdovecot.so.0(+0x104411) [0x7f439cc2b411] -> /usr/lib/dovecot/libdovecot.so.0(+0x5688f) [0x7f439cb7d88f] -> /usr/lib/dovecot/libdovecot.so.0(+0x5ae87) [0x7f439cb81e87] -> /usr/lib/dovecot/libdovecot.so.0(+0x1245ac) [0x7f439cc4b5ac] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x2f524) [0x7f439c30b524] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x307e9) [0x7f439c30c7e9] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_message_body_get_text+0x4a) [0x7f439c30d40a] -> /usr/lib/dovecot/libdovecot-sieve.so.0(ext_body_get_part_list+0x51) [0x7f439c34a3e1] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x6ebc2) [0x7f439c34abc2] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_interpreter_continue+0x9a) [0x7f439c320cda] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_multiscript_run+0x92) [0x7f439c338202] -> /usr/lib/dovecot/modules/lib90_sieve_plugin.so(+0x39ba) [0x7f439c3a99ba] -> /usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver+0x179) [0x7f439ce6f8d9] -> dovecot/lmtp(lmtp_local_default_deliver+0x1d4) [0x55c39e8ec724] -> dovecot/lmtp(lmtp_local_data+0x5ac) [0x55c39e8ece7c] -> dovecot/lmtp(client_default_cmd_data+0x18d) [0x55c39e8eb83d] -> dovecot/lmtp(cmd_data_continue+0x180) [0x55c39e8eb5d0] -> /usr/lib/dovecot/libdovecot.so.0(+0x7628b) [0x7f439cb9d28b] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69) [0x7f439cc41609] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x132) [0x7f439cc42cf2] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x50) [0x7f439cc416b0] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x40) [0x7f439cc41870] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7f439cbb38e3] -> dovecot/lmtp(main+0x22a) [0x55c39e8ea27a] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f439c972d7a] -> dovecot/lmtp(_start+0x2a) [0x55c39e8ea38a]
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
participants (4)
-
Aki Tuomi
-
hi@zakaria.website
-
Maciej Milaszewski
-
Michael