<@U01PL2YSG8L> we are facing cluster unhealthy <e...
# community-help
a
@Kishore Nallan we are facing cluster unhealthy ew5h2tr67livkp41p-1.a1.typesense.net
a
Same issue as last time, threadpool exhaustion
Your amount of CPUs is not enough for your search/write pattern
a
But we are not doing any bulk write
Is any traffic load increase
a
At some points you are having 45 RPS, which can be a lot for a 2vCPU cluster
You can share some cURL example of search queries you are performing, we can try seeing if there is any improvement that can decrease CPU usage
a
Now it's working
How
a
Whenever there is a search, Typesense alocate a thread to process it. When the server is out of threads (threadpool exhaustion) it stops processing new searches. As searches finishes, they release the thread Since it stops receiving new requests, it have enough time to process all requests and freeing up the threads, which makes the cluster back
a
Ok then what is solution, these issue facing recently couple of days
a
As I mentioned above, you either increase your vCPU amount or limit the traffic
You can also share some cURl example of seaches and I can try checking for any improvement point
a
Ok I will share tomorrow,
curl --location 'https://ew5h2tr67livkp41p-1.a1.typesense.net/multi_search?x-typesense-api-key=ynYXfz3KuyLdSvLrMitLZWtsOImkATlb' \ --header 'Content-Type: application/json' \ --data '{"searches":[{"q":"chemistry","query_by":"isbn,title,author, embedding,publication","prioritize_token_position":true,"max_facet_values":10,"num_typos":"2","min_len_1typo":2,"split_join_tokens":"always","typo_tokens_threshold":10,"per_page":12,"sort_by":"num_is_out_of_stack:asc","pre_segmented_query":true,"drop_tokens_threshold":0,"facet_sample_threshold":1000,"facet_sample_percent":20,"exclude_fields":"embedding","stopwords":"stopword-set-1","highlight_full_fields":"isbn,title,author, embedding,publication","collection":"books_collection","facet_by":"agedGroup,author,binding,bookCondition,bookType,isOutOfStock,language,price,publication","page":1}]}'
@Alan Martini
a
@Akash Kumar You query seems fine, no point of high CPU usage. Therefore, we are back to these options:
As I mentioned above, you either increase your vCPU amount or limit the traffic
a
ok