Dovecot full text search (Squat) indexer memory tip

Not so long ago Squat was announced, an integrated full text search engine within Dovecot with basically no additional software required. This makes the use of FTS much easier within dovecot.

But, there is something that cannot be found elsewhere on the internet. That is the fact that by default the memory limit for the FTS indexer is only 256MB, probably not enough for mailboxes with more than 10.000 emails stored in them. You end up with these errors in /var/log/mail.err:

 dovecot: indexer-worker(mail@domain.com): Fatal: master: 
service(indexer-worker): child 2394 returned error 83 (Out of memory (service indexer-worker { vsz_limit=256 MB },
 you may need to increase it) - set CORE_OUTOFMEM=1 environment to get core dump)

This can be fixed by raising the limit in the following way:

file 90-plugin.conf in /etc/dovecot/conf.d/:

plugin {
  fts = squat
  fts_squat = partial=4 full=10
  fts_autoindex=yes
  vsz_limit=1024MB
}

(Note the vsz_limit that changes the limit to 1024MB).