lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amrit Sarkar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-12783) Slow queries log print status [-1] for potentially 500 error code
Date Tue, 18 Sep 2018 21:42:00 GMT

    [ https://issues.apache.org/jira/browse/SOLR-12783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16619768#comment-16619768
] 

Amrit Sarkar commented on SOLR-12783:
-------------------------------------

Looking into the code;

SolrCmdDistributor : 
{code:java}
public static class Error {
  public Exception e;
  public int statusCode = -1;
{code}
DistributedUpdateProcessor :
{code:java}
/** Helper method for constructor */
private static int buildCode(List<Error> errors) {
  assert null != errors;
  assert 0 < errors.size();

  int minCode = Integer.MAX_VALUE;
  int maxCode = Integer.MIN_VALUE;
  for (Error error : errors) {
    log.trace("REMOTE ERROR: {}", error);
    minCode = Math.min(error.statusCode, minCode);
    maxCode = Math.max(error.statusCode, maxCode);
  }
  if (minCode == maxCode) {
    // all codes are consistent, use that...
    return minCode;
  } else if (400 <= minCode && maxCode < 500) {
    // all codes are 4xx, use 400
    return ErrorCode.BAD_REQUEST.code;
  } 
  // ...otherwise use sensible default
  return ErrorCode.SERVER_ERROR.code;
}
{code}

>  Slow queries log print status [-1] for potentially 500 error code
> ------------------------------------------------------------------
>
>                 Key: SOLR-12783
>                 URL: https://issues.apache.org/jira/browse/SOLR-12783
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: master (8.0)
>            Reporter: Amrit Sarkar
>            Priority: Major
>
> For {{slow}} queries on {{update}}/{{select}} handler, we receive status {{-1}} at number of
occasions;
> {code:java}
> WARN - 2018-09-17 17:37:16.683; org.apache.solr.core.SolrCore; slow: [collection_shard2_replica0]
webapp=/solr path=/update params={wt=javabin&version=2} status=-1 QTime=61066
> ERROR - 2018-09-17 17:37:16.683; org.apache.solr.common.SolrException; null:org.apache.solr.update.processor.DistributedUpdateProcessor$DistributedUpdatesAsyncException:
Async exception during distribute
> d update: Read timed out
> at org.apache.solr.update.processor.DistributedUpdateProcessor.doFinish(DistributedUpdateProcessor.java:972)
> at org.apache.solr.update.processor.DistributedUpdateProcessor.finish(DistributedUpdateProcessor.java:1911)
> at org.apache.solr.update.processor.UpdateRequestProcessor.finish(UpdateRequestProcessor.java:80)
> at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:78)
> at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
> at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> at org.eclipse.jetty.server.Server.handle(Server.java:534)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
> at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
> at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
> at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
> at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
> at java.lang.Thread.run(Thread.java:745)
> WARN - 2018-09-17 17:37:16.683; org.apache.solr.servlet.ResponseUtils; invalid return
code: -1{code}
> statusCode *-1* doesn't indicate anything; and appropriate HTTP response code will be
better.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message