Symptoms
Accessing Webmail for multiple users is loading slowly. When inspecting the mail log files for errors, the below errors can be found:
Dec 16 07:19:07 server dovecot: lmtp(user@server.com)
<2413210><L9RcGmtE2V+a0iQAmXnioA>: Panic: file
mail-transaction-log-file.c: line 105 (mail_transaction_log_file_free)
: assertion failed: (!file->locked)
Dec 16 07:20:07 server dovecot: lmtp(user@server.com)
<2413286><OG8TIqdE2V/m0iQAmXnioA>: Panic: file
mail-transaction-log-file.c: line 105 (mail_transaction_log_file_free)
: assertion failed: (!file->locked)
Dec 16 07:20:07 server dovecot: lmtp(user@server.com)
<2414274><6Y5WM6dE2V/C1iQAmXnioA>: Panic: file
mail-transaction-log-file.c: line 105 (mail_transaction_log_file_free)
: assertion failed: (!file->locked)
Note: The Dovecot log file can be found at path "/var/log/maillog". For example, the below search command can be used in SSH to determine if assertion failed errors have occurred for any users.
grep assertion /var/log/maillog
Description
When an account exceeds the disk quota in the middle of writing Dovecot files, it can cause assertion failures. The main concern with assertion failures is that it will kill the child process handling a mail request. For example, Dovecot child processes could be handling other logins or other tasks at the time of kill. This causes delays in webmail because the child process in Dovecot gets killed. A common cause for this issue is running out of disk space or disk quota during a write.
Workaround
Increase the quota if the account quota is exceeded, then rebuild the index manually.
- Modify the account quota if the account has exceeded the quota
- Modify the email account quota if the email account has exceeded the quota
cPanel Email Accounts - Quota Status
- Rebuild the index for an account with the below SSH command:
Note: Replace "cPaneluser" with the affected cPanel username. Replace "emailuser" with the email account experiencing the slowness issue.
/scripts/remove_dovecot_index_files cPaneluser
/usr/bin/doveadm index -u emailuser INBOX