System malloc out of memory

Discussion in 'Installation/Configuration' started by Djiraf, Nov 6, 2024.

  1. Djiraf

    Djiraf Member

    Hi, my ISPconfig works perfect. But i got strange error yesterday. It seems like:
    upload_2024-11-6_17-40-7.png
    I tried fix it into dovecot.conf, as google advised. But it didnt help. It is someting easy, but i dont understood. Thanks for help :)
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    It may be dovecot.conf does not help here.
    If your computer runs out of memory, you can
    • add swap file or swap partition
    • install more RAM memory to the computer
    • try to configure applications to use less memory, but this may turn out to be difficult
    • monitor the system to see what is using the RAM, to maybe configure that application
    If your computer is running on some cloud service it may be easy to add memory, and then restart the host.
     
    ahrasis likes this.
  3. vsurlan

    vsurlan New Member

    Try to increase your vsz_limit in dovecot.conf:

    Code:
    service imap {
      vsz_limit = 512M
    }
    
     
  4. Djiraf

    Djiraf Member

    My VM have 4gb RAM, and 4 cpu's, is it not enough? I get this error when my users try to send big message, like a 100MB, in other cases everything is fine.
     
  5. Djiraf

    Djiraf Member

    I tried. Into my conf i havent "service imap...", but i added that, then restart my VM. It didnt help
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    If it's enough or not depends on system usage. Try adding a swap file with e.g. 2-4GB.
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Seems it is not enough for the services you run on that host. The error message you showed says "Out of memory".
    Show output of
    Code:
    free -h
    to see info on memory usage.
     
  8. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    i don't think it's down to the amount of ram on the server/vps.

    as @vsurlan indicated with the dovecot change, i believe it's caused by the max amount of ram the imap or lmtp process is allowed to use.

    i had similar error messages when a client was trying to send emails with 400Mb attachments.
     
  9. pyte

    pyte Well-Known Member HowtoForge Supporter

    Please check if the error messages changed at all. Does it report the new size you set as vsz_limit?
    What does "doveconf -a | grep vsz_limit" report?

    Raising this limit should rather be done in the "/etc/dovecot/conf.d/" directory with a new file "zzz_vsz_custom.conf":
    Code:
    service imap {
    vsz_limit = 512MB
    }
    Can you check the size of the dovecot index for the mailbox in question? You can find it at "/var/vmail/{domain.tld}/{username}/Maildir/dovecot.list.index"
     
  10. Djiraf

    Djiraf Member

    Please
     

    Attached Files:

  11. Djiraf

    Djiraf Member

    But i tried it. Its not helped. After that try it was removed
     
  12. Djiraf

    Djiraf Member

    I try again to add that:
    Code:
    root@mailserver:~# doveconf -a | grep vsz_limit
    default_vsz_limit = 256 M
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 512 M
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
    root@mailserver:~#
    
    After reboot server:
    Code:
    root@mailserver:~# doveconf -a | grep vsz_limit
    default_vsz_limit = 256 M
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 512 M
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
      vsz_limit = 18446744073709551615 B
    
    About "/var/vmail/{domain.tld}/{username}/Maildir/dovecot.list.index", in my path i have /var/vmail/{domain.tld}/{username}/.quotausage and nothing more.
     
  13. Djiraf

    Djiraf Member

    I think that i didnt understand something. I created a new file zzz_vsz_custom.conf in /etc/dovecot/conf.d/, and wrote there:
    Code:
    service imap {
    vsz_limit = 512MB
    And nothing happed. But when i changed dovecot.conf by added:
    Code:
    service imap {
    vsz_limit = 512MB
    I got this line after output command "doveconf -a | grep vsz_limit":
    Code:
      vsz_limit = 512 M
     
  14. Djiraf

    Djiraf Member

    I did it yesterday, and its not helped.
     
  15. pyte

    pyte Well-Known Member HowtoForge Supporter

    It is possible that the Indexfile is too large for the settings, which will result in the error you mentioned. You should check if that's the case, but you need to figure out where you Maildir Home is. Did you change the default Maildir Path that is set in ISPConfig? You can find that setting under "Sever Config" -> "{Hostname of the Mailserver}" -> E-Mail Tab
     
  16. Djiraf

    Djiraf Member

    I found it. Maildir Home is /mailstorage. There i see user mailbox, from which mail we tried to send large message, inside Maildir has dovecot.list.index. I cant read this file, and its size is 1128Byte
     
  17. pyte

    pyte Well-Known Member HowtoForge Supporter

    Oh you are trying to send large messages which triggers this error? I've must have completely missed that.
    After adjusting the vsz_limit what does the log now show when you try sending a large message?
     
  18. Djiraf

    Djiraf Member

    Yes, we tried send message size more than 100mb. mail.log show the same:
    Code:
    Nov 26 08:47:02 mailserver postfix/qmgr[1858]: 9B3BD120327: from=<[email protected]>, size=206944020, nrcpt=1 (queue active)
    Nov 26 08:47:02 mailserver dovecot: lmtp(3531): Connect from local
    Nov 26 08:47:04 mailserver dovecot: lmtp([email protected])<3531><MyIuG9ZgRWfLDQ>: Fatal: pool_system_malloc(268435456): Out of memory
    Nov 26 08:47:04 mailserver dovecot: lmtp([email protected])<3531><MyIuG9ZgRWfLDQ>: Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x46) [0x7f490e2d90b6] -> /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x22) [0x7f490e2d91d2] -> /usr/lib/dovecot/libdovecot.so.0(+0x109fab) [0x7f490e2e5fab] -> /usr/lib/dovecot/libdovecot.so.0(+0x10a047) [0x7f490e2e6047] -> /usr/lib/dovecot/libdovecot.so.0(+0x5d1e4) [0x7f490e2391e4] -> /usr/lib/dovecot/libdovecot.so.0(+0x61728) [0x7f490e23d728] -> /usr/lib/dovecot/libdovecot.so.0(+0x115740) [0x7f490e2f1740] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_try_alloc+0xe5) [0x7f490e2f2df5] -> /usr/lib/dovecot/libdovecot.so.0(+0x119846) [0x7f490e2f5846] -> /usr/lib/dovecot/libdovecot.so.0(+0x119dbd) [0x7f490e2f5dbd] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read_memarea+0x78) [0x7f490e2f1fa8] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x3e) [0x7f490e2f219e] -> /usr/lib/dovecot/libdovecot.so.0(+0x11de91) [0x7f490e2f9e91] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read_memarea+0x78) [0x7f490e2f1fa8] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x3e) [0x7f490e2f219e] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read_data+0x45) [0x7f490e2f2b45] -> /usr/lib/dovecot/libdovecot.so.0(io_stream_copy+0x7c) [0x7f490e30b48c] -> /usr/lib/dovecot/libdovecot.so.0(o_stream_send_istream+0x53) [0x7f490e30b173] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_storage_save_continue+0x2d) [0x7f490e496aad] -> /usr/lib/dovecot/libdovecot-storage.so.0(maildir_save_continue+0x24) [0x7f490e441484] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_save_continue+0x3e) [0x7f490e41889e] -> /usr/lib/dovecot/libdovecot-storage.so.0(mail_storage_copy+0xb1) [0x7f490e40a1a1] -> /usr/lib/dovecot/libdovecot-lda.so.0(+0x4eef) [0x7f490e528eef] -> /usr/lib/dovecot/modules/lib10_quota_plugin.so(+0x121dd) [0x7f490daa51dd] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x66d2f) [0x7f490e418d2f] -> /usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver_save+0x1c1) [0x7f490e529b31] -> /usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver+0x241) [0x7f490e52a1d1] -> dovecot/lmtp(lmtp_local_default_deliver+0x1e8) [0x55b06d1a0408] -> dovecot/lmtp(lmtp_local_data+0x59a) [0x55b06d1a0b4a] -> dovecot/lmtp(client_default_cmd_data+0x191) [0x55b06d19f4c1]
    Nov 26 08:47:04 mailserver dovecot: lmtp([email protected])<3531><MyIuG9ZgRWfLDQ>: Fatal: master: service(lmtp): child 3531 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)
    Nov 26 08:47:04 mailserver postfix/lmtp[3530]: 9B3BD120327: to=<[email protected]>, relay=mailserver.domain.com[private/dovecot-lmtp], delay=417, delays=415/0.06/0.03/2.2, dsn=4.4.2, status=deferred (lost connection with mailserver.domain.com[private/dovecot-lmtp] while sending end of data -- message may be sent more than once)
    Nov 26 08:47:12 mailserver postfix/smtps/smtpd[3505]: warning: hostname customer.mmmiflx1.pop.starlinkisp.net does not resolve to address ENEMY_IPADDR: Name or service not known
    
     
  19. pyte

    pyte Well-Known Member HowtoForge Supporter

    I guess we're all a bit blind ;-)
    The original error states service lmtp thus changing the service imap vsz_limit has not changed anything in your case.
    Try raising the vsz_limit for the lmtp service as desribe above with:

    Code:
    service lmtp {
    vsz_limit = 512MB
    }
     
    Last edited: Nov 26, 2024
  20. Djiraf

    Djiraf Member

    Mb .D
    But i did it week ago. Esterday remove this from dovecot.conf, and today i did it again, and its not helped. I wrote about that
     

Share This Page