dockerで動かしているdovecotがメモリ不足で止まる件
mailserver | 2024-07-27T08:38:00.234533+09:00 dmail dovecot: lmtp(hoge@fl8.jp)<808><9IeOFlYzpGYoAwAAYeEKNQ>: Fatal: block_alloc(16777216): Out of memory mailserver | 2024-07-27T08:38:00.248320+09:00 dmail dovecot: lmtp(hoge@fl8.jp)<808><9IeOFlYzpGYoAwAAYeEKNQ>: Error: Raw backtrace: #0 test_subprocess_fork[0x7f13b77baa20] -> #1 backtrace_append[0x7f13b77bac90] -> #2 backtrace_get[0x7f13b77bae20] -> #3 execvp_const[0x7f13b77c7f90] -> #4 i_syslog_fatal_handler[0x7f13b77c8900] -> #5 i_fatal_status[0x7f13b771e758] -> #6 i_fatal_status[0x7f13b7722a58] -> #7 pool_alloconly_create_clean[0x7f13b77e9f30] -> #8 p_strdup[0x7f13b77fed00] -> #9 maildir_uidlist_sync_next_uid[0x7f13b792e1e0] -> #10 maildir_uidlist_sync_next[0x7f13b792e6d0] -> #11 maildir_list_index_update_sync[0x7f13b7927750] -> #12 maildir_list_index_update_sync[0x7f13b79281f0] -> #13 maildir_list_index_update_sync[0x7f13b79286a0] -> #14 maildir_storage_sync_init[0x7f13b79298c0] -> #15 mailbox_sync_init[0x7f13b78ff890] -> #16 mailbox_sync[0x7f13b78ff950] -> #17 index_mailbox_get_metadata[0x7f13b797b890] -> #18 maildir_uidlist_get_mailbox_guid[0x7f13b7925ec0] -> #19 mailbox_get_metadata[0x7f13b78ffea0] -> #20 quota_count[0x7f13b6f2fdc0] -> #21 quota_count[0x7f13b6f300c0] -> #22 quota_get_resource[0x7f13b6f2de30] -> #23 quota_transaction_commit[0x7f13b6f339e0] -> #24 quota_transaction_commit[0x7f13b6f33e60] -> #25 mailbox_transaction_commit_get_changes[0x7f13b78f8660] -> #26 mailbox_transaction_commit[0x7f13b78f87a0] -> #27 sieve_act_redirect_add_to_result[0x7f13b6cf2900] -> #28 sieve_code_mark_specific[0x7f13b6ce77f0] -> #29 sieve_result_execute[0x7f13b6cea490] -> #30 sieve_multiscript_finish[0x7f13b6cfac90] -> #31 [unw_get_proc_name() failed: -10] -> #32 mail_deliver[0x7f13b7a0a740] -> #33 lmtp_local_default_deliver[0x559d12bef0e0] -> #34 lmtp_local_data[0x559d12bf06f0] -> #35 client_default_cmd_data[0x559d12bf2630] -> #36 cmd_data_continue[0x559d12bee970] -> #37 pwrite_full[0x7f13b78081e0] -> #38 io_loop_call_io[0x7f13b77dfc70] -> #39 io_loop_handler_run_internal[0x7f13b77e1970] -> #40 io_loop_handler_run[0x7f13b77e1b00] -> #41 io_loop_run[0x7f13b77e1cd0] -> #42 master_service_run[0x7f13b7752180] -> #43 main[0x559d12bee010] -> #44 __libc_init_first[0x7f13b750b1d0] -> #45 __libc_start_main[0x7f13b750b280] -> #46 _start[0x559d12bee370] mailserver | 2024-07-27T08:38:00.257406+09:00 dmail dovecot: lmtp(hoge@fl8.jp)<808><9IeOFlYzpGYoAwAAYeEKNQ>: Fatal: master: service(lmtp): child 808 returned error 83 (Out of memory (service lmtp { vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1 environment to get core dump) mailserver | 2024-07-27T08:38:00.265854+09:00 dmail postfix/lmtp[807]: 2270A90028D: to=<hoge@fl8.jp>, relay=hoge.fl8.jp[/var/run/dovecot/lmtp], delay=2.3, delays=0.37/0.01/0.02/1.9, dsn=4.4.2, status=deferred (lost connection with hoge.fl8.jp[/var/run/dovecot/lmtp] while sending end of data -- message may be sent more than once)
[docker-mailserver]# cat docker-data/dms/config/dovecot.cf service lmtp { vsz_limit = 512 MB } service lmtp { process_limit = 10 } #default_process_limit = 100 #default_client_limit = 1000 #default_vsz_limit = 1024M
※プロセスが多いと並列処理が増えて処理数増えるが、メモリ食いすぎるのでプロセス数を減らす
# docker exec -it mailserver cat /etc/dovecot/local.conf service lmtp { vsz_limit = 512 MB } service lmtp { process_limit = 10 } #default_process_limit = 100 #default_client_limit = 1000 #default_vsz_limit = 1024M