freescout icon indicating copy to clipboard operation
freescout copied to clipboard

Search too slow on ~60k tickets.

Open vitaliany opened this issue 4 years ago • 3 comments

Hi guys! We use Freescout since August 2020 and now have almost 60k tickets. When users try find any word in search it goes to 504 error. I have watched logs and increased time of execusion script from 60 sec (by default) up to 120 sec with fastcgi_read_timeout 120; in nginx.conf. But as I understood it with grow of tickets the search will work slower. I guess it needed your attention. We use VPS 2x2.4+ Ghz, 1Gb RAM, 30Gb space, 100 Mbps link Thanks

vitaliany avatar Jan 25 '21 14:01 vitaliany

ElasticSearch integration or such could help but if you handle that many tickets and want to go thru all of them in your DB, upgrading your resources would be required at some point too. Maybe there're free alternative search engines which I'm not aware of right now.

TimoStramann avatar Jan 25 '21 23:01 TimoStramann

Well, the Search Method is relatively inefficient. The performance is heavily impacted by the "%" wildcard operator here. "%" at the beginning of a string destroy most possible DB optimization from Indexing, etc.

One easy optimization would be to replace the "like" operation with "=" for conversations.number and conversations.id because the benefit of the "like" here is quite limited and probably not worthwhile.

The change would also be consistent with the respective filters for these fields (number and id)

psuet avatar Apr 01 '21 02:04 psuet

We're having the same issue. I think a FULLTEXT search will be the most appropriate solution. I will investigate if this can be handled by a module.

RienNeVaPlus avatar Apr 20 '22 13:04 RienNeVaPlus

@freescout-helpdesk Is there any update on this? The search performance is currently incredibly slow on any productive data amount.

It would already help to only search within the current mailbox by default - right now, Freescout always looks in all mailboxes before the search can be filtered by mailbox.

MarcoWel avatar Oct 27 '22 18:10 MarcoWel

@freescout-helpdesk Hi, So we are seeing this issue becoming worse with the more tickets we have,

What do you suppose the best method might be to improve this, I wonder if using a service like MeiliSearch would be an option?

I know Laravel scout includes this now, but would require Laravel 8

Any ideas would be greatly appreciated :)

IIT-Richard avatar Oct 30 '22 23:10 IIT-Richard

We'll check MeiliSearch. For now the only solution is to add CPU power to your server.

freescout-helpdesk avatar Oct 31 '22 05:10 freescout-helpdesk

LaravelScout allows to search within one collection while FreeScout needs to perform joined search among Conversations, Threads, Customers, Custom Fields, etc. There is a discussion on Eloquent joins here but without a solution. If anyone knows how to make LaravelScout work with joins - feel free to share.

freescout-helpdesk avatar Oct 31 '22 06:10 freescout-helpdesk

Why not perform a mailbox-wide search only by default? And only search in subject, sender and content text by default, and only within a limited timeframe (e.g. the last 12 months)?

That way, the search speed can already improved drastically over the current default "search every possible field in every existing mailbox over an unlimited amount of time". Within the search results, the user could then ease the filters if the results are not satisfying.

MarcoWel avatar Oct 31 '22 09:10 MarcoWel

Most FreeScout instances don't have issues with the search performance, so they don't need those limitations by default. You can implement them via a custom module.

freescout-helpdesk avatar Nov 09 '22 07:11 freescout-helpdesk

Suggested improvement via #2390 and added feature request here: https://feedback.userreport.com/25a3cb5f-e4bd-4470-b6f3-79fcfaa8e90f/#idea/391084

MarcoWel avatar Nov 17 '22 08:11 MarcoWel

https://freescout.net/module/faster-search/

freescout-helpdesk avatar Dec 07 '22 14:12 freescout-helpdesk

https://freescout.net/module/faster-search/

Hi there,

I've been utilizing Freescout alongside Faster search module for a several months. Unfortunately, Meilisearch.com's free services were abruptly suspended today. The API has ceased to function, and upon logging into my account, I was prompted to provide billing information for a monthly charge of 30 USD. Could you kindly suggest an alternative solution?

Thank you.

SecteurA avatar Aug 21 '23 08:08 SecteurA

Install Meilisearch on your own server.

freescout-helpdesk avatar Aug 21 '23 08:08 freescout-helpdesk

is there

Install Meilisearch on your own server.

Thank you for your fast reply, is there any guide to do that ? and i if i do, where should i use the Faster search Module ? because i need a Meilisearch URL and Admin API Key

Thank you

SecteurA avatar Aug 21 '23 08:08 SecteurA