are you using multipartrequest?

if you are using the latest solrj can you try with the batch add method

add(Iterator<SolrInputDocument> )

or

add(Iterator<?> )

On Wed, Apr 8, 2009 at 10:13 PM, vivek sar <vivex...@gmail.com> wrote:
> single thread everything works fine. Two threads are fine too for a
> while and all the sudden problem starts happening.
>
> I tried indexing using REST services as well (instead of Solrj), but
> with that too I get following error after a while,
>
> 2009-04-08 10:04:08,126 ERROR [indexerThreadPool-5] Indexer -
> indexData()-> Failed to index
> java.net.SocketException: Broken pipe
>        at java.net.SocketOutputStream.socketWrite0(Native Method)
>        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
>        at java.io.FilterOutputStream.write(FilterOutputStream.java:80)
>        at 
> org.apache.commons.httpclient.methods.StringRequestEntity.writeRequest(StringRequestEntity.java:145)
>        at 
> org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
>        at 
> org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
>        at 
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
>        at 
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
>        at 
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
>        at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
>        at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
>
>
> Note, I'm using "simple" lock type. I'd tried "single" type before
> that once caused index corruption so I switched to "simple".
>
> Thanks,
> -vivek
>
> 2009/4/8 Noble Paul നോബിള്‍  नोब्ळ् <noble.p...@gmail.com>:
>> do you see the same problem when you use a single thread?
>>
>> what is the version of SolrJ that you use?
>>
>>
>>
>> On Wed, Apr 8, 2009 at 1:19 PM, vivek sar <vivex...@gmail.com> wrote:
>>> Hi,
>>>
>>>  Any ideas on this issue? I ran into this again - once it starts
>>> happening it keeps happening. One of the thread keeps failing. Here
>>> are my SolrServer settings,
>>>
>>>        int socketTO = 0;
>>>        int connectionTO = 100;
>>>        int maxConnectionPerHost = 10;
>>>        int maxTotalConnection = 50;
>>>        boolean followRedirects = false;
>>>        boolean allowCompression = true;
>>>        int maxRetries = 1;
>>>
>>> Note, I'm using two threads to simultaneously write to the same index.
>>>
>>> org.apache.solr.client.solrj.SolrServerException:
>>> org.apache.commons.httpclient.ProtocolException: Unbuffered entity
>>> enclosing request can not be repeated.
>>>        at 
>>> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:470)
>>>        at 
>>> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:242)
>>>        at 
>>> org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:259)
>>>        at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
>>>        at 
>>> org.apache.solr.client.solrj.SolrServer.addBeans(SolrServer.java:57)
>>>
>>> Thanks,
>>> -vivek
>>>
>>> On Sat, Apr 4, 2009 at 1:07 AM, vivek sar <vivex...@gmail.com> wrote:
>>>> Hi,
>>>>
>>>>  I'm sending 15K records at once using Solrj (server.addBeans(...))
>>>> and have two threads writing to same index. One thread goes fine, but
>>>> the second thread always fails with,
>>>>
>>>>
>>>> org.apache.solr.client.solrj.SolrServerException:
>>>> org.apache.commons.httpclient.ProtocolException: Unbuffered entity
>>>> enclosing request can not be repeated.
>>>>        at 
>>>> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:470)
>>>>        at 
>>>> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:242)
>>>>        at 
>>>> org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:259)
>>>>        at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
>>>>        at 
>>>> org.apache.solr.client.solrj.SolrServer.addBeans(SolrServer.java:57)
>>>>        at 
>>>> com.apple.afterchat.indexer.solr.handler.BeanIndexHandler.indexData(BeanIndexHandler.java:44)
>>>>        at com.apple.afterchat.indexer.Indexer.indexData(Indexer.java:77)
>>>>        at com.apple.afterchat.indexer.Indexer.run(Indexer.java:39)
>>>>        at 
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>>>>        at 
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>>>>        at java.lang.Thread.run(Thread.java:637)
>>>> Caused by: org.apache.commons.httpclient.ProtocolException: Unbuffered
>>>> entity enclosing request can not be repeated.
>>>>        at 
>>>> org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:487)
>>>>        at 
>>>> org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
>>>>        at 
>>>> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
>>>>        at 
>>>> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
>>>>        at 
>>>> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
>>>>        at 
>>>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
>>>>        at 
>>>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
>>>>        at 
>>>> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:417)
>>>>
>>>> Does anyone know what could be the problem?
>>>>
>>>> Thanks,
>>>> -vivek
>>>>
>>>
>>
>>
>>
>> --
>> --Noble Paul
>>
>



-- 
--Noble Paul

Reply via email to