Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 请求本地主机时速度非常慢';使用旋度的s solr(在C+;+;)_Apache_Curl_Solr - Fatal编程技术网

Apache 请求本地主机时速度非常慢';使用旋度的s solr(在C+;+;)

Apache 请求本地主机时速度非常慢';使用旋度的s solr(在C+;+;),apache,curl,solr,Apache,Curl,Solr,在solr的日志中,查询只需要1ms,但在客户端的日志中,curl\u easy\u perform()需要200ms。solr及其客户端位于同一台计算机上。 如果我将solr移动到另一台机器上,即使是在不同的城市,也需要200毫秒 Here is the code in client: curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteDat

在solr的日志中,查询只需要1ms,但在客户端的日志中,curl\u easy\u perform()需要200ms。solr及其客户端位于同一台计算机上。 如果我将solr移动到另一台机器上,即使是在不同的城市,也需要200毫秒

Here is the code in client:

curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteData);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &body);
int64_t time_start = GetTimeInMiuSec();
res = curl_easy_perform(curl);
int64_t time_end = GetTimeInMiuSec();;
VLOG(0) << "time:\t" << time_end - time_start << " miu secs";
以下是客户端中的代码:
curl_easy_setopt(curl,CURLOPT_URL,URL.c_str());
curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,WriteData);
curl_easy_setopt(curl、CURLOPT_WRITEDATA和body);
int64_t time_start=GetTimeInMiuSec();
res=旋度(curl)\u容易执行(curl);
int64_t time_end=GetTimeInMiuSec();;

VLOG(0)从命令行运行curl需要多长时间?您可以在solr端排除该问题。实时时间为180ms。从solr返回的QTime如何?QTime不包括solr执行搜索后生成文档所需的时间。你的文件大吗?