Topic: Roundcube/Dovecot timeout when searching for large inboxes in Roundcub
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version: CentOS 7.6.1810
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (MariaDB)
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
Log file:
Sep 24 15:42:03 orion-mail1 dovecot: imap(kolektor@sezamhosting.com): Connection closed (UID SORT running for 98.229 + waiting input for 0.002 secs, 0.001 in locks, 49 B in + 395 B out, state=wait-external) in=86 out=1212
Error message on roundcube page:
Server Error! (Gateway Time-out)
====
My current Inbox size is 28801, beside that i have couple of other folders archived by years, all messages in total of over 300k. When i try to use search in roundcube, after some time i get timed out with message displayed above and in /var/log/dovecot/imap.log file i have line also displayed above.
For now, the troubleshooting steps I've applied are increasing php and php-fpm timeouts and memory in dovecot
/etc/php.ini:
max_execution_time = 600
max_input_time = 600
/etc/php-fpm.d/www.conf:
request_terminate_timeout = 60s
request_slowlog_timeout = 60s
/etc/dovecot/conf.d/10-master.conf:
service imap {
# Most of the memory goes to mmap()ing files. You may need to increase this
# limit if you have huge mailboxes.
#vsz_limit = $default_vsz_limit
vsz_limit = 1024M
# Max. number of IMAP processes (connections)
#process_limit = 1024
}
But nothing prevails. All i have managed is to increase time took that the search is going on for, but there had to be another way to better figure this out.
Any help would be greatly appreciated!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.