1 (edited by Bronko 2024-03-13 01:08:57)

Topic: php-fpm "executing too slow" roundcube

- iRedMail version (check /etc/iredmail-release): 1.6.8
- Deployed with downloadable installer
- Linux/BSD distribution name and version: ubuntu 22.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- 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.


not the first issue about "executing too slow" but in different context...

My server isn't under pressure when I try to search at roundcube a keyword in "Entire message" in "All folders" and it gives me an "Server error! (error)" beside log file entries:

Mar 12 10:20:50 mail php-fpm[590299]: [WARNING] [pool inet] child 631270, script '/opt/www/roundcubemail/index.php' (request: "GET /mail/index.php?_task=mail&_action=search&_interval=&_q=keyword&_headers=text&_layout=widescreen&_filter=ALL&_scope=all&_mbox=INBOX&_remote=1&_unlock=loading1710235237989&_=1710234363157") executing too slow (11.950493 sec), logging
Mar 12 10:20:50 mail php-fpm[590299]: [NOTICE] child 631270 stopped for tracing
Mar 12 10:20:50 mail php-fpm[590299]: [NOTICE] about to trace 631270
Mar 12 10:20:50 mail php-fpm[590299]: [NOTICE] finished trace of 631270

Opened an issue here but closed.

Tried to play with some time limits (seems to be 10sec), like here:
https://forum.howtoforge.com/threads/ho … ost-394663

But it doesn't helped.

Any further hints for me?


Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.


Re: php-fpm "executing too slow" roundcube

Searching entire message inside a large mailbox could take long time, Dovecot cannot finish the search as soon as possible.

In this case you may need to implement FTS (full-text search) support in Dovecot.
iRedMail Easy integrates fts-xapian in Dovecot, you can give it a try:

Of course there're other solutions, do some research with Google. smile

3 (edited by Bronko 2024-03-30 20:19:49)

Re: php-fpm "executing too slow" roundcube

Thanks, now it takes two seconds... ;-)

ubuntu 22.04 steps:

# apt install dovecot-fts-xapian xapian-tools
# mkdir -p /usr/local/libexec/dovecot/
# cp /usr/share/doc/dovecot-core/examples/decode2text.sh /usr/local/libexec/dovecot/decode2text.sh
# nano  /etc/dovecot/dovecot.conf
mail_plugins = (...) fts fts_xapian
!include conf.d/90-fts.conf
# nano /etc/dovecot/conf.d/90-fts.conf
plugin {
    fts = xapian
    fts_xapian = partial=3 full=20

    fts_autoindex = yes
    fts_enforced = yes

    fts_autoindex_exclude = \Trash

    # Index attachements
    fts_decoder = decode2text

service indexer-worker {
    # Increase vsz_limit to 2GB or above.
    # Or 0 if you have rather large memory usable on your server, which is preferred for performance)
    vsz_limit = 2G
    process_limit = 0

service decode2text {
    executable = script /usr/local/libexec/dovecot/decode2text.sh
    user = dovecot
    unix_listener decode2text {
        mode = 0666
# systemctl restart dovecot.service
# doveadm index -A \*

(take a coffee)

# crontab -e
30   4   *   *   *   /usr/bin/doveadm fts optimize -A