Note that there are some explanatory texts on larger screens.

plurals
  1. POResponse time in client was much longer than QTime in tomcat
    text
    copied!<p>I have a solr website with about 500 docs ( 30 fileds defined in schema ), and a c# client <strong>on the same machine</strong> which would sent http get request to that solr website. These logs were recorded by my c# client:</p> <pre><code>01-16 23:54:49,301 [107] INFO LogHelper - requst time too long: 1054, solr time: 1003 01-16 23:54:49,847 [63] INFO LogHelper - requst time too long: 1068, solr time: 1021 01-16 23:57:17,813 [108] INFO LogHelper - requst time too long: 1051, solr time: 1027 01-16 23:57:18,313 [111] INFO LogHelper - requst time too long: 1031, solr time: 1007 and so on… </code></pre> <p>You can see , the query time from solr were so long and every similar (between 1000ms to 1050ms). On the same time, the corresponding logs in tomcat:</p> <pre><code>2013-1-16 23:54:49 org.apache.solr.core.SolrCore execute Info: [suit1] webapp=/vanclsearchV2 path=/select/ params={fl=id,typeid,createtime,vprice,sprice,price,totalassesscount,totalsalescount,productcode,productname,stylecode,tag,vpricesku,spricesku,pricesku,userrate,assesscount,lstphotos,mainphotos,salesflag,isduanma,detailsalescount,productplusstyleinfo&amp;sort=createtime+desc&amp;start=0&amp;q=*:*&amp;wt=json&amp;fq=ancestorsid:(28976+OR+28978)&amp;fq=typeid:(1)&amp;rows=30} hits=43 status=0 QTime=0 2013-1-16 23:54:49 org.apache.solr.core.SolrCore execute Info: [suit1] webapp=/vanclsearchV2 path=/select/ params={fl=id,typeid,createtime,vprice,sprice,price,totalassesscount,totalsalescount,productcode,productname,stylecode,tag,vpricesku,spricesku,pricesku,userrate,assesscount,lstphotos,mainphotos,salesflag,isduanma,detailsalescount,productplusstyleinfo&amp;sort=createtime+desc&amp;start=0&amp;q=*:*&amp;wt=json&amp;fq=ancestorsid:(28976+OR+28978)&amp;fq=typeid:(1)&amp;rows=30} hits=43 status=0 QTime=0 2013-1-16 23:57:17 org.apache.solr.core.SolrCore execute Info: [suit1] webapp=/vanclsearchV2 path=/select/ params={fl=id,typeid,createtime,vprice,sprice,price,totalassesscount,totalsalescount,productcode,productname,stylecode,tag,vpricesku,spricesku,pricesku,userrate,assesscount,lstphotos,mainphotos,salesflag,isduanma,detailsalescount,productplusstyleinfo&amp;sort=createtime+desc&amp;start=0&amp;q=*:*&amp;wt=json&amp;fq=ancestorsid:(27547+OR+27614)&amp;rows=30} hits=9 status=0 QTime=0 2013-1-16 23:57:18 org.apache.solr.core.SolrCore execute Info: [suit1] webapp=/vanclsearchV2 path=/select/ params={fl=id,typeid,createtime,vprice,sprice,price,totalassesscount,totalsalescount,productcode,productname,stylecode,tag,vpricesku,spricesku,pricesku,userrate,assesscount,lstphotos,mainphotos,salesflag,isduanma,detailsalescount,productplusstyleinfo&amp;sort=createtime+desc&amp;start=0&amp;q=*:*&amp;wt=json&amp;fq=ancestorsid:(27547+OR+27614)&amp;rows=30} hits=9 status=0 QTime=0 </code></pre> <p>Every strange, all the QTime were zero! Can anyone explain this circumstance, and how to solve the problem?</p> <pre><code>string QUERY_TEMPLATE = ConfigurationManager.AppSettings["solr-select-url"] + "/select/?fl={0}&amp;q={1}{2}&amp;start={3}&amp;rows={4}&amp;sort={5}&amp;wt=json"; WebRequest request = HttpWebRequest.Create(string.Format(QUERY_TEMPLATE, requestInfo.BrowserType==BrowserTypeEnum.Style?STYLE_FIELDS:COLOR_FIELDS, string.IsNullOrWhiteSpace(requestInfo.KeyWord) ? "*:*" : requestInfo.KeyWord, filterQuery, (requestInfo.Page - 1) * requestInfo.RowsCount, requestInfo.RowsCount, sortFiled) ); request.Method="GET"; string resultString=null; Stopwatch solrWatch = new Stopwatch(); solrWatch.Start(); using (WebResponse response = request.GetResponse()) { using (Stream stream = response.GetResponseStream()) { using (StreamReader reader = new StreamReader(stream)) { resultString = reader.ReadToEnd(); } } } solrWatch.Stop(); solrTime = solrWatch.ElapsedMilliseconds; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload