Hey guys,
We’re started seeing timeouts regularly on our /search
query, we’ve benchmarked some search terms and some queries might take up to 2mins to complete. We found this post but were wondering if they are any additional recommendations on how to deal with this. Some relevant information related to our particular case:
- Our biggest site (the one that’s timing out more often) has about 1,700,000 posts.
- We are using some default postgresql autovacuum settings. We gathered some stats around the pertinent tables:
categories
,posts
,topics
,post_search_data
,users
and they seemed to get vacuumed about once a day so we do not think this has to do with dead rows slowing down our search. - We’ve manually run the
Jobs::ReindexSearch.new({})
but did not see any considerable improvement
We’re considering running the rake search:reindex
on that site which we know already will take quite a while but we are wondering if you have any other suggestion?
Thank you in advance