Hi Grant, Q.Why do you need two web apps pointing to the same Solr data directory? A.I am planning to deploy solr in a load balanced environment where there will be 3 web servers and 3 app servers.So there will be solr web app deployed in 3 app servers and there will be 1 SOLR_DATA folder shared in the storage area network for all 3 solr web apps to search.Similarly we will have appX running on 3 app servers which can indexing data to the same repository using the respective solr web app.I am trying to share the same SOLR_DATA folder for simplifying maintainance. Q.Why can't your two webapps share a single Solr instance? A.As I understand you are asking why applications using solr cannot index data to the same solr instance.Reason being failure of one of the app server should not lead to failure of the platform or I can say to take all the advantages of load balancing.
Please inform if this is the right way of deployment or there is other better alternative. Regards, Rinesh. Grant Ingersoll-6 wrote: > > In Lucene (hence Solr) only one IndexWriter may write to an index at a > time (by design), so pointing two separate Solr instances at the same > index will result in the lock issue you describe. > > I guess the question back to you is, why do you need two web apps > pointing to the same Solr data directory? Why can't your two webapps > share a single Solr instance? > > On Dec 6, 2008, at 5:45 AM, Rinesh1 wrote: > >> >> Hi, >> Just adding some additional steps I have tried. >> I have tried the following scenarios for testing this. >> >> FIRST >> >> 1.Index 5000 docs to solr using the FIRST web app >> 2.send a commit command from the SECOND web app >> 3.Tried indexing docs from the SECOND web app. >> LOCKING ISSUE EXISTS >> >> SECOND >> 1.Index 5000 docs to solr using the FIRST web app >> 2.send a commit command from the FIRST web app >> 3.Tried indexing docs from the SECOND web app. >> THERE IS NO LOCKING ISSUE NOW >> >> Is commiting the only solution .Is there any other solution >> >> Regards, >> Rinesh >> >> Rinesh1 wrote: >>> >>> Hi, >>> Please help me with the following scenario. >>> I have a solr data folder "SOLR_DATA" >>> >>> I have 2 web applications solr1 and solr 2 referring to the same >>> SOLR_DATA folder. >>> I am trying to index data using solr1/update and solr2/update >>> sequentially. >>> >>> Indexing using the first web app happens fine. >>> But when I try using the second web app, I am getting the >>> following >>> error >>> SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock >>> obtain >>> timed out: [EMAIL PROTECTED]:\apache-solr-1.2.0\example\solr\data\index >>> \writ >>> e.lock >>> at org.apache.lucene.store.Lock.obtain(Lock.java:70) >>> at org.apache.lucene.index.IndexWriter.init(IndexWriter.java: >>> 579) >>> at >>> org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:341) >>> at >>> org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java: >>> 65) >>> at >>> org >>> .apache >>> .solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java: >>> 120) >>> at >>> org >>> .apache >>> .solr >>> .update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java: >>> 181) >>> at >>> org >>> .apache >>> .solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java: >>> 259) >>> at >>> org >>> .apache >>> .solr >>> .handler >>> .XmlUpdateRequestHandler.update(XmlUpdateRequestHandler.java:166) >>> at >>> org >>> .apache >>> .solr >>> .handler >>> .XmlUpdateRequestHandler >>> .handleRequestBody(XmlUpdateRequestHandler.java:84) >>> at >>> org >>> .apache >>> .solr >>> .handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77) >>> at org.apache.solr.core.SolrCore.execute(SolrCore.java:658) >>> at >>> org >>> .apache >>> .solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:191) >>> at >>> org >>> .apache >>> .solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java: >>> 159) >>> at >>> org >>> .apache >>> .catalina >>> .core >>> .ApplicationFilterChain >>> .internalDoFilter(ApplicationFilterChain.java:235) >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: >>> 206) >>> at >>> org >>> .jboss >>> .web >>> .tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) >>> at >>> org >>> .apache >>> .catalina >>> .core >>> .ApplicationFilterChain >>> .internalDoFilter(ApplicationFilterChain.java:235) >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: >>> 206) >>> at >>> org >>> .apache >>> .catalina >>> .core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) >>> at >>> org >>> .apache >>> .catalina >>> .core.StandardContextValve.invoke(StandardContextValve.java:175) >>> at >>> org >>> .jboss >>> .web >>> .tomcat >>> .security >>> .SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) >>> at >>> org >>> .jboss >>> .web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java: >>> 84) >>> at >>> org >>> .apache >>> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) >>> at >>> org >>> .apache >>> .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) >>> at >>> org >>> .jboss >>> .web >>> .tomcat >>> .service >>> .jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) >>> at >>> org >>> .apache >>> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: >>> 109) >>> at >>> org >>> .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: >>> 241) >>> at >>> org >>> .apache.coyote.http11.Http11Processor.process(Http11Processor.java: >>> 844) >>> at >>> org.apache.coyote.http11.Http11Protocol >>> $Http11ConnectionHandler.process(Http11Protocol.java:580) >>> at >>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: >>> 447) >>> at java.lang.Thread.run(Thread.java:595) >>> >>> Looks like there is some locking happening . >>> How can I unlock it.Is it because I have not committed the data >>> after indexing from the first web application. >>> This was mainly to test whether N web applications can share >>> same >>> SOLR_DATA folder. >>> >>> Please provide your inputs . >>> Thanks in advance, >>> Rinesh Kumar. >>> >>> >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Solr-Locking-Issue-tp20868016p20868783.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> > > -------------------------- > Grant Ingersoll > > Lucene Helpful Hints: > http://wiki.apache.org/lucene-java/BasicsOfPerformance > http://wiki.apache.org/lucene-java/LuceneFAQ > > > > > > > > > > > > -- View this message in context: http://www.nabble.com/Solr-Locking-Issue-tp20868016p20869645.html Sent from the Solr - User mailing list archive at Nabble.com.