Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Server Error: Failed to send UID SEARCH command" when searching large mailboxes #1715

Open
ctrlaltdel opened this issue Jan 23, 2020 · 7 comments · May be fixed by #1716
Open

"Server Error: Failed to send UID SEARCH command" when searching large mailboxes #1715

ctrlaltdel opened this issue Jan 23, 2020 · 7 comments · May be fixed by #1716

Comments

@ctrlaltdel
Copy link
Contributor

See this forum post for an occurrence of this issue.

I'm experiencing the same issue while trying to find e-mail in a 6.2 GB folder (yeah... I know!).

Here's what dovecot logs in this case:

Jan 23 15:17:45 imap(XXX): Info: Connection closed (UID SORT running for 15.849 + waiting input for 0.001 secs, 0.001 in locks, 139 B in + 0 B out, state=wait-external) in=178 out=763

And roundcube displays a popup with the following message:

Server Error: Failed to send UID SEARCH command

A 15 seconds timeout looks a bit small, so I'll propose to raise it to something like 5 minutes. I don't see any obvious drawbacks in doing it by default.

ctrlaltdel added a commit to ctrlaltdel/mailinabox that referenced this issue Jan 23, 2020
Two different timouts need to be set:
  - imap_timeout in roundcube configuration
  - fastcgi_read_timeout in nginx as rouncube imap sessions are going through HTTPS

Closes mail-in-a-box#1715.
ctrlaltdel added a commit to ctrlaltdel/mailinabox that referenced this issue Jan 23, 2020
Two different timeouts needs to be set:
  - imap_timeout in roundcube
  - fastcgi_read_timeout in nginx as rouncube imap sessions are going through HTTPS

Closes mail-in-a-box#1715.
@jvolkenant
Copy link
Contributor

jvolkenant commented Jan 23, 2020

what is the search backend being used? afaik a FTS plugin is needed for searching now that lucene is gone after 14.04.
Apparently dovecot does have an internal search https://doc.dovecot.org/configuration_manual/fts/ (Which I've never found to work on my 25k emails)

I run my own solr FTS backend from which I do search with dovecot. I modified php.ini's timeout and not nginx's config. master...jvolkenant:solr-jetty

The forum post above mentions the php.ini change but not one for nginx. Are both needed, or one or the other?

@xenithorb
Copy link

I am also seeing this. Maybe time to implement FTS by default?

Pattern in mail.log is (with dovecot debug enabled)

...
Sep 20 01:18:25 imap(server): Debug: Mailbox INBOX: Opened mail UID=19936 because: search
Sep 20 01:18:25 imap(server): Debug: Mailbox INBOX: Opened mail UID=19937 because: search
Sep 20 01:18:25 imap(server): Debug: Mailbox INBOX: Opened mail UID=19938 because: search
Sep 20 01:18:25 imap(server): Debug: Mailbox INBOX: Opened mail UID=19939 because: search
Sep 20 01:18:25 imap(server): Fatal: master: service(imap): child 4275 killed with signal 11 (core dumped)

With the following in the kernel logs:

[ 1245.581617] imap[4275]: segfault at 8 ip 00007f8d94068973 sp 00007ffd8d2586a0 error 4 in libdovecot.so.0.0.0[7f8d93fdf000+128000]

FYI the title's error msg is from within Roundcube, (so what most users will see) but this is not were the problem resides, as it's internal to dovecot. Only really seeing this after v0.48, but maybe I increased by mail count enough since the upgrade..

Any temporary fixes?

@xenithorb
Copy link

Note, In a hail-mary effort I just rebased @jvolkenant 's https://github.com/jvolkenant/mailinabox/tree/solr-jetty with v0.48 and all is well and searching now works for me after re-applying the install (start.sh). Thanks! Hopefully this is another +1 for returning a feature we lost with Bionic.

@myfirstnameispaul
Copy link
Contributor

Just wondering if anyone has looked at creating a PR to add Solr to MiaB?

I have one mailbox that the search is getting a little slow for devices that don't store locally IMAP (Thunderbird seems to store IMAP locally, but Android.... no).

I suspect that as time goes on, this will be come an issue for more MiaB users.

Have to admit that I've never configured it before, so I don't know the requirements or other potential issues.

@jvolkenant
Copy link
Contributor

You can use solr from my tree here https://github.com/jvolkenant/mailinabox/tree/solr-jetty , but it's not supported. Solr (really jetty) is a resource hog, but it works on my 1GB memory VM (with not much to spare)

@myfirstnameispaul
Copy link
Contributor

Just out of curiosity, have you experimented with changing files format maildir to sdbox?

@jvolkenant
Copy link
Contributor

I have not. I try to keep it as stock as possible since I use my MIAB box for testing patches I submit here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants