Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences
C++ algoliadatastoreelasticsearchenterprise-searchfacetingfull-text-searchfuzzy-searchgeosearchin-memoryinstantsearchmerchandisingpineconesearchsearch-enginesemantic-searchsimilarity-searchsite-searchsynonymstypo-tolerancevector-search
Tweak timeouts.
Kishore Nallan172fc49837c5
diff --git a/include/http_proxy.h b/include/http_proxy.hindex 438fbda0..dee7c015 100644--- a/include/http_proxy.h+++ b/include/http_proxy.h@@ -24,7 +24,7 @@ struct http_proxy_res_t {class HttpProxy {// singleton class for http proxypublic:- static const size_t default_timeout_ms = 30000*4;+ static const size_t default_timeout_ms = 60000;static const size_t default_num_try = 2;static HttpProxy& get_instance() {diff --git a/src/collection_manager.cpp b/src/collection_manager.cppindex 39217969..ac740da8 100644--- a/src/collection_manager.cpp+++ b/src/collection_manager.cpp@@ -838,7 +838,7 @@ Option<bool> CollectionManager::do_search(std::map<std::string, std::string>& retext_match_type_t match_type = max_score;size_t vector_query_hits = 250;- size_t remote_embedding_timeout_ms = 30000;+ size_t remote_embedding_timeout_ms = 5000;size_t remote_embedding_num_try = 2;size_t facet_sample_percent = 100;diff --git a/src/http_client.cpp b/src/http_client.cppindex 638c9ef7..a1bea098 100644--- a/src/http_client.cpp+++ b/src/http_client.cpp@@ -158,10 +158,8 @@ long HttpClient::perform_curl(CURL *curl, std::map<std::string, std::string>& reif(res == CURLE_OPERATION_TIMEDOUT) {double total_time;- char* http_method;curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);- curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_METHOD, http_method);- LOG(ERROR) << "CURL timeout. Time taken: " << total_time << ", URL: " << http_method << " " << url;+ LOG(ERROR) << "CURL timeout. Time taken: " << total_time << ", URL: " << url;status_code = 408;} else {LOG(ERROR) << "CURL failed. URL: " << url << ", Code: " << res << ", strerror: " << curl_easy_strerror(res);diff --git a/src/http_proxy.cpp b/src/http_proxy.cppindex f3734652..f4fceba2 100644--- a/src/http_proxy.cpp+++ b/src/http_proxy.cpp@@ -68,7 +68,8 @@ http_proxy_res_t HttpProxy::send(const std::string& url, const std::string& methbreak;}- LOG(ERROR) << "Proxy call failed, status_code: " << res.status_code << ", num_try: " << num_try;+ LOG(ERROR) << "Proxy call failed, status_code: " << res.status_code+ << ", timeout_ms: " << timeout_ms << ", num_try: " << num_try;}if(res.status_code == 408){