Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Mail app - FTS indexing fails on mailboxes with large attachments (HTTP timeout)

Mail app - FTS indexing fails on mailboxes with large attachments (HTTP timeout)

Scheduled Pinned Locked Moved Solved Support
mailsolr
16 Posts 3 Posters 842 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    paradoxbound
    wrote on last edited by
    #5

    With all due respect it has been almost 4 months since I reported this issue and almost 2 months since the last update. I don't care about new features in 10, I simply want the product I pay for to do what it says on the tin. I and my clients need to be able to search their mail.
    I gave a fairly detailed bug report and I will happily supply more details if that is what is required.
    At least give power users like myself the ability to edit our own configuration files.
    Really not a happy bunny right now.

    girishG 1 Reply Last reply
    2
    • P paradoxbound

      With all due respect it has been almost 4 months since I reported this issue and almost 2 months since the last update. I don't care about new features in 10, I simply want the product I pay for to do what it says on the tin. I and my clients need to be able to search their mail.
      I gave a fairly detailed bug report and I will happily supply more details if that is what is required.
      At least give power users like myself the ability to edit our own configuration files.
      Really not a happy bunny right now.

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #6

      @paradoxbound we are getting there with Cloudron 10. Unfortunately, there are no plans to make another release before that. Please hold on...

      1 Reply Last reply
      1
      • P paradoxbound

        Hello Cloudron,

        Thank you for fixing the Solr OOM issue, sadly that was just hiding another issue with users with large mailboxes and large attachments. Some users like to send enormous CAD and spreadsheets to each other and documents the size of war and peace.

        Issue:
        Full-text search indexing fails on mailboxes containing emails with large attachments due to a hardcoded 60-second HTTP timeout in Dovecot's FTS Solr communication.

        Evidence:

        • Mailbox A: 120,545 emails → 100% indexed successfully (small emails, batches complete in 1-3 seconds)

        • Mailbox B: 35,212 emails → Only 48% indexed (emails with large attachments cause slow batches)

        Root Cause:
        When Tika processes large email attachments during indexing, some batches of 200 emails take longer than 60 seconds to complete. Dovecot's HTTP client times out and aborts the transaction, even though Solr successfully completes the processing.
        Example from logs:

        doveadm(user): Error: fts_solr: Indexing failed: Request timed out (Request queued 61.852 secs ago, 60.144 in http ioloop)
        doveadm(user): Error: Mailbox [name]: Transaction commit failed: FTS transaction commit failed
        

        Solr logs show a batch completed in 74 seconds, but Dovecot gave up at 60 seconds.
        Requested Fix:
        Make the HTTP timeout dynamic based on mailbox size (similar to how SOLR_HEAP was made dynamic in 9.1.6).

        Suggested implementation:

        • Environment variable: DOVECOT_FTS_TIMEOUT (default: 60, recommended: 180-300 for large mailboxes)
        • Or alternatively: DOVECOT_FTS_BATCH_SIZE to reduce batch size from 200 to 50 which avoids calculating mailbox sizes.

        Workaround:
        None available - /app/code/dovecot-config/dovecot-fts.conf is read-only and resets on container updates.
        Related:
        This issue was discovered after the SOLR_HEAP fix in version 9.1.6 resolved OOM crashes. The timeout issue was previously masked by the memory errors.

        cloudron-support --troubleshoot
        Vendor: QEMU Product: Standard PC (i440FX + PIIX, 1996)
        Linux: 5.15.0-176-generic
        Ubuntu: jammy 22.04
        Execution environment: kvm
        Processor: AMD EPYC Processor (with IBPB) x 10
        RAM: 61714212KB
        Disk: /dev/sda3       1.2T
        [OK]	node version is correct
        [OK]	IPv6 is enabled and public IPv6 address is working
        [OK]	docker is running
        [OK]	docker version is correct
        [OK]	MySQL is running
        [OK]	netplan is good
        [OK]	DNS is resolving via systemd-resolved
        [OK]	unbound is running
        [OK]	nginx is running
        [OK]	dashboard cert is valid
        [OK]	dashboard is reachable via loopback
        [OK]	No pending database migrations
        [OK]	Service 'mysql' is running and healthy
        [OK]	Service 'postgresql' is running and healthy
        [OK]	Service 'mongodb' is running and healthy
        [OK]	Service 'mail' is running and healthy
        [OK]	Service 'graphite' is running and healthy
        [OK]	Service 'sftp' is running and healthy
        [OK]	box v9.1.6 is running
        [OK]	Dashboard is reachable via domain name
        [OK]	Domain xxxxxx is valid and has not expired
        
        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #7

        @paradoxbound said:

        Environment variable: DOVECOT_FTS_TIMEOUT (default: 60, recommended: 180-300 for large mailboxes)
        Or alternatively: DOVECOT_FTS_BATCH_SIZE to reduce batch size from 200 to 50 which avoids calculating mailbox sizes.

        I investigated this now finally. DOVECOT_FTS_TIMEOUT seems to be made up, there is no such thing. https://github.com/dovecot/core/blob/2.3.21/src/plugins/fts-solr/solr-connection.c#L105 hardcoded the timeout to 60 and this value is not configurable in dovecot.

        The only thing we can do is to lower the batch size. I have made the change to cut this down to 50. @paradoxbound as a workaround since yo uare running this on QMEU, simply allocate more CPU power to the CLoudron VM to get over this for the moment. Or have you tried this already?

        1 Reply Last reply
        1
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #8

          @paradoxbound also to double check, do you see multiple errors with timeout ? Just wondering if dovecot moves on to other "batches" if one batch errors or not. According to various LLMs, it does move on, but I want to confirm this behavior in practice.

          1 Reply Last reply
          0
          • P Offline
            P Offline
            paradoxbound
            wrote last edited by
            #9

            I don't let LLMs on my production services but I do use them to help troubleshoot. Dovecot doesn't move on when a batch fails. I will rerun the troubleshooting and post some log output, along with actual config variables. I own those two incorrect variables. Claude has been spanked and I now have GLM 5.2 running as LLM-as-Judge on it's output.

            girishG 1 Reply Last reply
            0
            • P paradoxbound

              I don't let LLMs on my production services but I do use them to help troubleshoot. Dovecot doesn't move on when a batch fails. I will rerun the troubleshooting and post some log output, along with actual config variables. I own those two incorrect variables. Claude has been spanked and I now have GLM 5.2 running as LLM-as-Judge on it's output.

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote last edited by
              #10

              @paradoxbound No worries, I managed to reproduce the issue and have applied a fix. I have to reduce the batch size to 50. I have also provided a FTS status now on the dashboard to see the indexing status.

              1 Reply Last reply
              1
              • girishG girish has marked this topic as solved
              • necrevistonnezrN Offline
                necrevistonnezrN Offline
                necrevistonnezr
                wrote last edited by necrevistonnezr
                #11

                On an updated Cloudron 10.0.1, I get „64“ mail indexing errors (lots of them):

                Error indexing - Bulk: doveadm index -u user@domain.com, 
                - Bulk failed with code 64
                
                1 Reply Last reply
                0
                • girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote last edited by
                  #12

                  @necrevistonnezr is there anything more in the mail container logs?

                  1 Reply Last reply
                  0
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote last edited by
                    #13

                    Could it be you have a folder named "- Bulk" ?

                    necrevistonnezrN 1 Reply Last reply
                    0
                    • girishG girish

                      Could it be you have a folder named "- Bulk" ?

                      necrevistonnezrN Offline
                      necrevistonnezrN Offline
                      necrevistonnezr
                      wrote last edited by necrevistonnezr
                      #14

                      @girish said:

                      Could it be you have a folder named "- Bulk" ?
                      Yes, many of my folders have a - in their name so they sorted on top of folder lists.

                      From /home/yellowtent/platformdata/logs/mail/app.log⁠:

                      2026-08-26T06:50:10+02:00 [POST] /fts_config
                      2026-08-26T06:50:10+02:00 2026-08-26 04:50:10,632 INFO waiting for dovecot to stop
                      2026-08-26T06:50:11+02:00 2026-08-26 04:50:11,741 INFO stopped: dovecot (exit status 0)
                      2026-08-26T06:50:11+02:00 2026-08-26 04:50:11,745 INFO spawned: 'dovecot' with pid 7630
                      2026-08-26T06:50:11+02:00 Warning: fd limit (ulimit -n) is lower than required under max. load (1024 < 1500), because of default_client_limit
                      2026-08-26T06:50:12+02:00 2026-08-26 04:50:12,771 INFO success: dovecot entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
                      2026-08-26T06:50:11+02:00 2026-08-26 04:50:11,741 INFO stopped: dovecot (exit status 0)
                      2026-08-26T06:50:11+02:00 2026-08-26 04:50:11,745 INFO spawned: 'dovecot' with pid 7630
                      2026-08-26T06:50:11+02:00 Warning: fd limit (ulimit -n) is lower than required under max. load (1024 < 1500), because of default_client_limit
                      2026-08-26T06:50:12+02:00 2026-08-26 04:50:12,771 INFO success: dovecot entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
                      2026-08-26T06:50:21+02:00 2026-08-26 04:50:21,953 INFO spawned: 'solr' with pid 7877
                      2026-08-26T06:50:22+02:00 2026-08-26 04:50:22,011 WARN exited: solr (exit status 1; not expected)
                      2026-08-26T06:50:23+02:00 2026-08-26 04:50:23,014 INFO spawned: 'solr' with pid 7925
                      2026-08-26T06:50:24+02:00 2026-08-26 04:50:24,146 INFO success: solr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
                      2026-08-26T06:50:24+02:00 2026-08-26 04:50:24,376 INFO spawned: 'tika' with pid 8014
                      2026-08-26T06:50:25+02:00 2026-08-26 04:50:25,931 INFO success: tika entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
                      [kdj@cloudron mail]$ tail app.log
                      2026-08-26T06:50:29+02:00 ==> Indexing mailbox - Bulk/Apartment for user: user@domain.com
                      2026-08-26T06:50:29+02:00 index: invalid option -- ' '
                      2026-08-26T06:50:29+02:00 ==> Failed to index mailbox - Bulk/Apartment for user: user@domain.com: doveadm index -u user@domain.com - Bulk/Apartment failed with code 64
                      
                      girishG 1 Reply Last reply
                      0
                      • necrevistonnezrN necrevistonnezr

                        @girish said:

                        Could it be you have a folder named "- Bulk" ?
                        Yes, many of my folders have a - in their name so they sorted on top of folder lists.

                        From /home/yellowtent/platformdata/logs/mail/app.log⁠:

                        2026-08-26T06:50:10+02:00 [POST] /fts_config
                        2026-08-26T06:50:10+02:00 2026-08-26 04:50:10,632 INFO waiting for dovecot to stop
                        2026-08-26T06:50:11+02:00 2026-08-26 04:50:11,741 INFO stopped: dovecot (exit status 0)
                        2026-08-26T06:50:11+02:00 2026-08-26 04:50:11,745 INFO spawned: 'dovecot' with pid 7630
                        2026-08-26T06:50:11+02:00 Warning: fd limit (ulimit -n) is lower than required under max. load (1024 < 1500), because of default_client_limit
                        2026-08-26T06:50:12+02:00 2026-08-26 04:50:12,771 INFO success: dovecot entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
                        2026-08-26T06:50:11+02:00 2026-08-26 04:50:11,741 INFO stopped: dovecot (exit status 0)
                        2026-08-26T06:50:11+02:00 2026-08-26 04:50:11,745 INFO spawned: 'dovecot' with pid 7630
                        2026-08-26T06:50:11+02:00 Warning: fd limit (ulimit -n) is lower than required under max. load (1024 < 1500), because of default_client_limit
                        2026-08-26T06:50:12+02:00 2026-08-26 04:50:12,771 INFO success: dovecot entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
                        2026-08-26T06:50:21+02:00 2026-08-26 04:50:21,953 INFO spawned: 'solr' with pid 7877
                        2026-08-26T06:50:22+02:00 2026-08-26 04:50:22,011 WARN exited: solr (exit status 1; not expected)
                        2026-08-26T06:50:23+02:00 2026-08-26 04:50:23,014 INFO spawned: 'solr' with pid 7925
                        2026-08-26T06:50:24+02:00 2026-08-26 04:50:24,146 INFO success: solr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
                        2026-08-26T06:50:24+02:00 2026-08-26 04:50:24,376 INFO spawned: 'tika' with pid 8014
                        2026-08-26T06:50:25+02:00 2026-08-26 04:50:25,931 INFO success: tika entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
                        [kdj@cloudron mail]$ tail app.log
                        2026-08-26T06:50:29+02:00 ==> Indexing mailbox - Bulk/Apartment for user: user@domain.com
                        2026-08-26T06:50:29+02:00 index: invalid option -- ' '
                        2026-08-26T06:50:29+02:00 ==> Failed to index mailbox - Bulk/Apartment for user: user@domain.com: doveadm index -u user@domain.com - Bulk/Apartment failed with code 64
                        
                        girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote last edited by
                        #15

                        @necrevistonnezr thanks! found the issue.

                        1 Reply Last reply
                        2
                        • girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote last edited by
                          #16

                          The core issue was a quoting problem. It was mistaking "-" as an argument instead of a folder name. Fixed in https://git.cloudron.io/platform/box/-/commit/04adf5de3470a944cf811a23613bceb9ea520b38

                          1 Reply Last reply
                          2

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Bookmarks
                          • Search