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

SoGO Search (with SOLR) not working correctly #2309

Closed
phipag opened this issue Feb 12, 2019 · 19 comments
Closed

SoGO Search (with SOLR) not working correctly #2309

phipag opened this issue Feb 12, 2019 · 19 comments

Comments

@phipag
Copy link

phipag commented Feb 12, 2019

Hello,

I am running a mailcow installation with ~200 mailboxes. Some users complain that their Sogo search does not work anymore (it always shows "no results found"). When I repair the indeces in Solr with docker-compose exec dovecot-mailcow doveadm fts rescan -A it works again but stops working after a few hours.

Mailcow is running on a qemu vm with 12GB ram.

@andryyy
Copy link
Contributor

andryyy commented Feb 12, 2019

Solr could be crashed. But nevertheless, we cannot help without logs from Dovecot and Solr (when users search and fail to find something).

@extremeshok
Copy link
Contributor

extremeshok commented Feb 12, 2019

You will need to set the SOLR_HEAP to more than 4096 in the .env (mailcow.conf)

SOLR requires a HEAP size of 2GB per every 1 million objects.

12GB ram is super low for a SOLR+SOGO and 200+users..

@phipag
Copy link
Author

phipag commented Feb 12, 2019

Okay, thank you already for the information. I will provide logs asap.

@chriscroome
Copy link
Contributor

chriscroome commented Feb 12, 2019

I have a Mailcow server with 246 domains and 1102 mailboxes, it has 36GB of RAM and I found that when SOLR was added to Mailcow the PHP container no longer worked, so I disabled it, would it be possible for the SOLR HEAP size to be dynamically generated? I'm willing to experiment with re-enabling SOLR on this server at a not very busy time.

@andryyy
Copy link
Contributor

andryyy commented Feb 12, 2019

PHP is not affected, but it might have run oom when Solr ate all the RAM.

You will need to find the fitting heap size for your setup.

@extremeshok
Copy link
Contributor

@chriscroome im suprised SOGO is working with activesync.
According to SOGO dev, it requires a minimum of 30mbyte ram per a mailbox, that excludes space for the actual object which is being transfered, ie +128mbyte per a connection

Wow, cant believe how ram limited your setups are and here I was complaining with 2 servers of 16cores and 256GB ram

@chriscroome
Copy link
Contributor

@extremeshok I have never use ActiveSync personally, the only MUA I use is Mutt... so I'm not sure if it is working or not, how could I find out?

@chriscroome
Copy link
Contributor

I wasn't waiting long enough for the PHP container to come up, with SOLR enabled it seems to take longer.

@chriscroome
Copy link
Contributor

I have started to receive complaints that emails are not returned in Solr search results and I have been able to confirm this, the Mailcow instance has 48GB of RAM, SOLR_HEAP is set to 16384, the admin interface reports:

Solr Image

I have been receiving all GitHub issues for Mailcow as email for a while, in Mutt if I limit the INBOX display to only email with the word "André" I have about 10 screens of emails, when I use the Solr search interface I have 8 messages:

Solr SOGo search results

This is following rebuilding the index earlier today:

docker-compose exec dovecot-mailcow doveadm index -A '*'

Any suggestions for any further debugging I could do to try to find out why the Solr index appears to have so many emails missing from it?

@chriscroome
Copy link
Contributor

After editing mailcow.conf to edit the SKIP_SOLR to set it to y and running docker-compose down and docker-compose up -d a search on my INBOX for "André" returns 4336 results and it only took a few seconds:

INBOX search screenshot

With Solr enabled 8 results are returned.

@andryyy
Copy link
Contributor

andryyy commented Apr 3, 2019

Perhaps it doesn't like "é". You could try a reindex.

@chriscroome
Copy link
Contributor

I had similar results without accented characters and I did do two reindexes before deciding to disable Solr and the only errors thrown up with the last reindex were the errors I posted to issue #2492.

@andryyy
Copy link
Contributor

andryyy commented Apr 3, 2019

Ok, don't know, cannot replicate and enotime.

@chriscroome
Copy link
Contributor

No problem, the search is fast enough without Solr and the resource usage is better so I don't see any drawbacks from disabling it. Perhaps leave this issue open for now in case anyone else is able to replicate this issue?

@hachre
Copy link
Contributor

hachre commented Apr 3, 2019

Try running both of these:

docker-compose exec dovecot-mailcow doveadm fts rescan -A
docker-compose exec dovecot-mailcow doveadm -v index -A '*'

This does a full rescan and has solved problems for me in the past which weren't solved by running just index alone.

@chriscroome
Copy link
Contributor

Thanks for the suggestion @hachre, I have set that running.

Is there a way of knowing if the rescan fails or generates any errors?

@hachre
Copy link
Contributor

hachre commented Apr 4, 2019

No, I haven't found a way personally. I needed to do it after the recent Solr-related updates but haven't done it since and everything is working fine right now.

@chriscroome
Copy link
Contributor

Thanks @hachre, your suggestion:

Try running both of these:

docker-compose exec dovecot-mailcow doveadm fts rescan -A
docker-compose exec dovecot-mailcow doveadm -v index -A '*'

This solved the problem, the search for "André" now returns 4346 messages, I guess the initial indexing, when Solr was first added, to Mailcow must have failed and this was the cause of the incomplete results.

@hachre
Copy link
Contributor

hachre commented Apr 6, 2019

Very nice! 👍

@hachre hachre closed this as completed Apr 6, 2019
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

No branches or pull requests

5 participants