Search isn’t returning any results, despite doing something for a noticeable amount of time.
Steps to reproduce
Using the current Mac desktop client, and server 5.12.2, enter a term in the Search field, then hit Enter.
Expected behavior
Search results are returned.
Observed behavior
The “Searching…” and wait spinner appear in the Search Results panel. After ~30 seconds, “No results found. Try again?” This is for a term I can see on the screen. This fails for every term we’ve tried, other than literally the word “work” which returns results after a short delay.
The only relevant thing I can see in the logs is:
{“level”:“warn”,“ts”:1562590449.2580738,“caller”:“sqlstore/post_store.go:955”,“msg”:“Query error searching posts: pq: canceling statement due to user request”}
Is there some way to re-index the message database so Search works again? Is there something I can do to figure out why it’s failing?
@Taffer For both this and the other issue you posted, it looks like it could be that your database server isn’t powerful enough. As we understand it, it’s unable to answer queries in time. This doc might help: https://docs.mattermost.com/install/requirements.html.
I’ve bumped the RAM and cores in our VM, both exceed the total requirements for running Mattermost and PostgreSQL, so hopefully this isn’t an issue now.
I’ve done some tuning of our PostgreSQL settings based on postgresqltuner hints.
Still no results for searches, other than this in the logs:
{"level":"warn","ts":1564152580.2032804,"caller":"sqlstore/post_store.go:955","msg":"Query error searching posts: pq: canceling statement due to user request"}
I guess the query is taking too long and the server cancels the request? Is there any way to configure this timeout?