I copied the whole index from our production box (which was having the delete issue) and put it on a test server and tried deleting docs and it works!!!! The only difference between the production server and test server is that production server keeps getting select queries from users pretty much all the time and the test server does not. I am totally baffled why the deletes hang on the production system.
I would really appreciate it if somebody could tell me the what happens inside solr when a delete request is issued !!! My head is totally numb from all the debugging. :-) BTW Iam using Solr 1.4.1 Ravi Kiran Bhaskar On Fri, Jan 28, 2011 at 4:23 PM, Ravi Kiran <ravi.bhas...@gmail.com> wrote: > Hello, > We have a core with about 900K docs. Recently I have noticed that > the deleteById query seems to always give me a SocketTimeoutException(stack > trace is shown below). I cannot figure out why only deletion fails but not > add/update. The SOLR client instance is created via spring wiring > (configuration given below). Did anybody face the same issue ? How can I > solve this issue ? Increasing the timeout did not help. > > Configuration > ------------------ > <bean id="solrServer" > class="org.apache.solr.client.solrj.impl.CommonsHttpSolrServer"> > <constructor-arg> > <value>http://xxxx:8080/solr-admin/xxxxcore</value> > </constructor-arg> > <property name="soTimeout" value="1000000"/> > <property name="connectionTimeout" value="10000000"/> > <property name="defaultMaxConnectionsPerHost" value="2000"/> > <property name="maxTotalConnections" value="10000"/> > <property name="followRedirects" value="false"/> > <property name="allowCompression" value="true"/> > <property name="maxRetries" value="1"/> > </bean> > > > Code > --------- > String filename = delfile.getName(); > String id = filename.replace("_search.xml", ""); > > log.debug("Deleting id " + id); > UpdateResponse response = solrServer.deleteById(id); > log.info("Deleting response for " + id + " is " + > response); > > boolean success = Util.moveFile(delfile, > delprocessedpath); > > /** > * Now delete old successfully processed files so that > full reindex > * from processed and transformed folders will not > process unwanted/deleted documents > */ > File transformedFile = new File(transformedpath + > (filename.replace("_search.xml", "_fast.xml"))); > if(transformedFile.exists()) { > log.info("Deleting archived Transformed file: " + > transformedFile.getAbsolutePath()); > transformedFile.delete(); > } > > File processedFile = new File(processedpath+filename); > if(processedFile.exists()) { > log.info("Deleting archived Processed file: " + > processedFile.getAbsolutePath()); > processedFile.delete(); > } > > Stack Trace > ------------------ > 2011-01-28 15:51:18,842-0500 ERROR > [com.search.service.topics.feedprocessor.DeleteFeedProcessor] - Error > deleting from Solr server for -AR2011011403385_search.xml > org.apache.solr.client.solrj.SolrServerException: > java.net.SocketTimeoutException: Read timed out > at > org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:472) > at > org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:243) > at > org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105) > at > org.apache.solr.client.solrj.SolrServer.deleteById(SolrServer.java:102) > at > com.search.service.topics.feedprocessor.DeleteFeedProcessor.processDelete(DeleteFeedProcessor.java:76) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276) > at > org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:260) > at > org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) > at org.quartz.core.JobRunShell.run(JobRunShell.java:202) > at > org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) > Caused by: java.net.SocketTimeoutException: Read timed out > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(SocketInputStream.java:129) > at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) > at java.io.BufferedInputStream.read(BufferedInputStream.java:237) > at > org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) > at > org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) > at > org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116) > at > org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) > at > org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973) > at > org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735) > at > org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098) > 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:416) > ... 13 more > > > > Thanks > > Ravi Kiran > >