Error - The request was aborted: The request was canceled.

396 views
Skip to first unread message

Rajasekhar Nemani

unread,
Oct 11, 2010, 3:28:36 PM10/11/10
to sol...@googlegroups.com
Hi,

I was wondering if you had an idea about the following error I am getting working with Solrnet

solr.Add(documents).Commit(options);
where options is
options = new WaitOptions {WaitFlush = true, WaitSearcher = true};

The stack trace of the error is

{"The request was aborted: The request was canceled."}
    [SolrNet.Exceptions.SolrConnectionException]: {"The request was aborted: The request was canceled."}
    Data: {System.Collections.ListDictionaryInternal}
    HelpLink: null
    InnerException: {"The request was aborted: The request was canceled."}
    Message: "The request was aborted: The request was canceled."
    Source: "SolrNet"
    StackTrace: "   at SolrNet.Impl.SolrConnection.Post(String relativeUrl, String s)\r\n   at SolrNet.Commands.AddCommand`1.Execute(ISolrConnection connection)\r\n   at SolrNet.Impl.SolrBasicServer`1.Send(ISolrCommand cmd)\r\n   at SolrNet.Impl.SolrBasicServer`1.Add(IEnumerable`1 docs)\r\n   at SolrNet.Impl.SolrServer`1.Add(IEnumerable`1 docs)\r\n   at Turner.EA.CNNSearch.Processor.Utilities.DoSolrCommit(List`1 documents, ISolrOperations`1 solr, Int32 commitDocsMaxLimt, Int32 commitDocsChunkSize) in C:\\FunProjects\\Turner.EA.CNNSearch.Processor\\Utilities.cs:line 60"
    TargetSite: {System.String Post(System.String, System.String)}

I am scheduling a bunch of tasks  and calling Parallel.ForEach inside each task.  When this error happens the Solr server running on Jetty is throwing the following error

Oct 11, 2010 2:46:31 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.RuntimeException: [was class org.mortbay.jetty.EofException] null
        at com.ctc.wstx.util.ExceptionUtil.throwRuntimeException(ExceptionUtil.java:18)
        at com.ctc.wstx.sr.StreamScanner.throwLazyError(StreamScanner.java:731)
        at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3657)
        at com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:809)
        at org.apache.solr.handler.XMLLoader.readDoc(XMLLoader.java:279)
        at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:138)
        at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:69)
        at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:285)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:835)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:641)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
        at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: org.mortbay.jetty.EofException
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:289)
        at org.mortbay.jetty.HttpParser$Input.blockForContent(HttpParser.java:919)
        at org.mortbay.jetty.HttpParser$Input.read(HttpParser.java:897)
        at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
        at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
        at sun.nio.cs.StreamDecoder.read(Unknown Source)
        at java.io.InputStreamReader.read(Unknown Source)
        at com.ctc.wstx.io.MergedReader.read(MergedReader.java:101)
        at com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:84)
        at com.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57)
        at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:992)
        at com.ctc.wstx.sr.BasicStreamReader.readTextSecondary(BasicStreamReader.java:4628)
        at com.ctc.wstx.sr.BasicStreamReader.readCoalescedText(BasicStreamReader.java:4126)
        at com.ctc.wstx.sr.BasicStreamReader.finishToken(BasicStreamReader.java:3701)
        at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3649)
        ... 26 more
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(Unknown Source)
        at org.mortbay.io.ByteArrayBuffer.readFrom(ByteArrayBuffer.java:168)
        at org.mortbay.io.bio.StreamEndPoint.fill(StreamEndPoint.java:99)
        at org.mortbay.jetty.bio.SocketConnector$Connection.fill(SocketConnector.java:196)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:281)
        ... 40 more

I cannot tellif this is something that is caused by Solr due to high commit rates and resulting in an error on the Solr side.  My problem is that I have to commit at a regular intervals and clear memory for further processing or I will receive an 'OutOFmemory" exception.

I appreciate your help
Thanks in advance
Raj

Mauricio Scheffer

unread,
Oct 12, 2010, 9:00:13 AM10/12/10
to sol...@googlegroups.com
Try playing with the number of documents you send in each iteration.
Also try reducing the commit frequency, you can probably get away with committing every ~5 iterations or so (depending on how many documents you handle in each iteration).


--
Mauricio




--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To post to this group, send email to sol...@googlegroups.com.
To unsubscribe from this group, send email to solrnet+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/solrnet?hl=en.

Rajasekhar Nemani

unread,
Oct 12, 2010, 2:28:42 PM10/12/10
to sol...@googlegroups.com
Thank you.  I have been trying that but I may have to go for some sort of producer/consumer pattern.  I am stuck between constraints with commit rates and system resources.  I have to think of other routes.
Thanks for your continued development work and support on SolrNet

Raj
Reply all
Reply to author
Forward
0 new messages