grosjo / fts-xapian

Dovecot FTS plugin based on Xapian
GNU Lesser General Public License v2.1
91 stars 19 forks source link

`Memory too low` warnings #128

Closed azmeuk closed 1 year ago

azmeuk commented 2 years ago

I use dovecot-fts-xapian 1.5.1 with dovecot 2.3.17.1 on a AlpineLinux LXC container (on a quite capable hypervisor with 64GB of memory), with a pretty standard configuration:

plugin {
    fts = xapian
    fts_xapian = partial=3 full=20 attachments=0 verbose=0

    fts_autoindex = yes
    fts_enforced = yes

    fts_autoindex_exclude = \Junk
    fts_autoindex_exclude2 = \Trash
    fts_autoindex_exclude3 = DUMPSTER
}

I can see a lot of Memory too low warnings in the log file.

Jul 18 16:24:35 mercure mail.warn dovecot: indexer-worker(gestion)<1320091><tFh6WRTk0JRR+ryc:s0qqMD9o1WKbJBQAvAoHdg>: Warning: FTS Xapian: Memory too low (text) 'std::bad_alloc'

The error message isn't very helpful as it is not clear what is required to solve the situation. Is this a bug or a misconfiguration of dovecot/fts_xapian, or is it some limitations from my system.

Thank you for your help.

edit: Note that there are other std::bad_alloc errors in the logs:

Jul 18 16:31:12 mercure mail.err dovecot: indexer-worker: Error: terminate called after throwing an instance of 'std::bad_alloc'
Jul 18 16:31:12 mercure mail.err dovecot: indexer-worker: Error:   what():  std::bad_alloc
grosjo commented 1 year ago

Try adding default_vsz_limit = 4G in your dovecot.conf file

azmeuk commented 1 year ago

This seems to do the work. Thank you :ok_hand: