There does not appear to be a lot of context. There is nothing relevant in /var/log/roundcubemail/errors, and the only thing that coincides and seems relevant is in /var/log/mail.log:
Jul 10 08:16:41 imap(user@domain): Info: Connection closed (UID SORT running for 16.093 + waiting input for 0.001 secs, 0.001 in locks, 35 B in + 0 B out, state=wait-external) in=106 out=1546
The error itself, which I quoted in my original post, appears in the GUI, not the logs.
Additional info: When searching for the error with respect to roundcubemail, I found the following: default_socket_timeout needs to be increased in php.ini to reduce/eliminate the error. I’ve attempted to do this (changing the value from 60 to 180 in /etc/php/7.2/cli and fpm), with no success. I tried increasing it to 360, but the error still occurs.
Yep. I issued a sudo service php7.2-fpm restart after increasing default_socket_timeout. It did not help.
I saw somewhere else (a cPanel forum, I believe) where similar UID SEARCH errors – but not this exact error – were due to corrupted user prefs in the database, and clearing them may help. Unfortunately, I do not know where to look or what command to run to do so with MIAB. See https://forums.cpanel.net/threads/error-in-imap-command-uid-search-unknown-argument.653875/ for that thread.
Anyone? Being unable to search my mailboxes is a show-stopper for me. I keep all sorts of things in my email archives. I’ve had to resort to grepping through the mailboxes from the shell, and that’s not a viable long-term solution.
Actually, I think I just fixed it. After some more digging, I found that mailinabox is setting roundcube’s imap_timeout to 15 seconds. I increased this (in my case, to 360 seconds, which may be overkill) by editing /usr/local/lib/roundcubemail/config/config.inc.php , and now my searches work!
I just discovered I have this problem as @mcl has had, but doing everything here didn’t solve my problem.
Background: both my wife and I have mailboxes that are over 9GB each. We would get the same error as described by the OP both in the UI and in the logs.
System description: v0.44 on a 4 x vCPU VM with 4GB vRAM configured on a 544GB vDisk.
However, I did finally manage to solve the problem doing this one extra step to what @mcl did. This includes modifying timeouts for the files:
So I thought I had fixed this… at least it worked for a day or so, but now it’s back. It times out with this error right at 60 seconds. The changes I mentioned above in various config files are still there, so don’t understand why it’s timing out after 60 seconds. Watching the VM performence indicators show that disk activity starts thrashing upon execution of the search & CPU activity ramps up as well, and continues for up to 2-3 minutes after the server produces this error (at 60 seconds in) on the Webclient.
So it would seem that the search is still continuing on the server, but the web client is timing out too early at 60 seconds.
Any one have any thoughts or suggestions of where to look to resolve this?
Here’s some more reasons why I think it’s a forced timeout issue from the Webclient perspective.
If I narrow down a full text search to “Unread” messages, then I have success with the search. I get 173 returned emails, but those are only Unread messages containing that search keyword. (BTW, I only have Body defined for the search, nothing else.). This takes about 40-50 seconds… just before the 60 second timeout error is produced on larger searches.
Of course, what I’m looking for is in a Read message, so this doesn’t help me. So if I revert it back to “ALL” messages to be searched, it reverts back to “Server Error! (Error)” or “Server Error! (Gateway Timeout)” error states in the Web client. This error comes up right at 60 seconds after starting any search. Always.
This is frustrating more for my wife, as she can’t use her old El Captain based Email client due to the TLS issue. I got her over to using the WebClient instead until she can afford to buy a new Mac (major purchases are on hold until Corona times are over). But she immediately ran into this issue trying to search her emails for some personal business info.
It’s like MailintheBox / Roundcube isn’t honouring that change to nginix.conf timeout properly.
And the crazy thing is I know we never had these problems with previous versions of MailintheBox - as I’ve been using the Webclient for all my email for more than a year, and have used the full text search to successfully search bodies of emails before (and my Email mailbox is bigger than hers at 13GB), so I feel a recent upgrade has introduced this bug.
I actually had this thought initially before you were making changes to nginx.conf … problem is that I am not good on the back end. I think that you may get some better traction opening this as an issue on the project’s git hub page.