Thanks. I’ll try that.
Thanks @alento.
In fact, it has been filed already. And from the pull-request I found what seems to have made it finally work again as expected.
In short manually adding the “fastcgi_read_timeout 300;” statement to my nginx.conf file made all the difference. Searches now can sail past the 60 second timeout value and return full results.
Also note, I reverted a lot of the other changes to timeouts (in /etc/php/7.2/cli and fpm) made as testing has proven these are not necessary. They are now back at their defaults.
Only two changes are needed to realise the fix to the problem.
The first is to change the IMAP timeout in:
/usr/local/lib/roundcubemail/config/config.inc.php
$config[‘imap_timeout’] = 300;
and the second change is to add “fastcgi_read_timeout 300;” to
/etc/nginx/nginx.conf
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
fastcgi_read_timeout 300;
# server_names_hash_bucket_size 64;
server_names_hash_bucket_size 128;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
Here is the source pull request where I found those fixes.
I just searched 60,000+ emails for the word “the” (thinking that would be most abusive) and it works perfectly now.
@mcl I would be curious if this fixes your same / similar problem.
I hope it helps you like it helped me. I can now close my wife’s trouble ticket.
Well…that fixed it… but wait, there’s more.
I was able to do some searches (by placing the server under some other load) that need more than 3 minutes to complete, but right at 3 minutes, I now consistently get this error:
I’ve been scouring the configuration files, trying to find a timeout of 180 seconds / 3 minutes specified somewhere, but cannot seem to find them.
I did a:
tail -f /var/log/mail.log /var/log/syslog /var/log/nginx/access.log /var/log/nginx/error.log
as I was doing the searches, and besides connection notifications, there’s no information in the logs that reveals why the Request Timed Out. But clearly I’m hitting a barrier somewhere.
This is an example of the type of search I’m attempting to perform…just choose an arbitrary name that I knew would be in my email box to test with. If I narrow the scope to just current Inbox or folder, than it will work in under 3 minutes successfully. But would be nice to have the full search scope option working as well.
My Mailinabox is running on a VM which resides on a i5 2.7-3.1Ghz CPU, with 4 cores dedicated to the VM and 4GB of RAM. The vDisk resides on a fast Samsung SSD. My mail file has 60,000 email messages. So I could imagine anyone with a machine less specs may also come up against this barrier as well.
Will continue to plunder ahead and try to find out the cause, but if anyone has an idea or guess they could suggest where I should look, it would be appreciated.
Hi @cowboy
I had one last MiaB install still running on Ubuntu 14.04 - I know, I know…
Anyways, it is now running mostly well on Ubuntu 18.04 with v 0.48.
But…
The fix you proposed in 22 is not seeming to work for me. Do you have any other info at this point??
Thanks!!
Have you been able to find a way to fix this. I also have the same problem. I cannot do search I’m getting the UID error.