Tweak timeouts.

This commit is contained in:
Kishore Nallan 2023-07-11 12:46:59 +05:30
parent 01801f4ea9
commit 172fc49837
4 changed files with 5 additions and 6 deletions

View File

@ -24,7 +24,7 @@ struct http_proxy_res_t {
class HttpProxy {
// singleton class for http proxy
public:
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() {

View File

@ -838,7 +838,7 @@ Option<bool> CollectionManager::do_search(std::map<std::string, std::string>& re
text_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;

View File

@ -158,10 +158,8 @@ long HttpClient::perform_curl(CURL *curl, std::map<std::string, std::string>& re
if(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);

View File

@ -68,7 +68,8 @@ http_proxy_res_t HttpProxy::send(const std::string& url, const std::string& meth
break;
}
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){