title: SolrCloud Exception writing document id to the index; possible analysis error
body: <p>I have a problem with my solrcloud 6.2.1, bad request after some docs indexed.</p>
  
  <p>which I have done :</p>
  
  <ul>
  <li><p><b>HardCommit</b></p></li>
  <li><p>Every &lt;1min commit=false  (400-600 Docs)</p></li>
  <li><p>Every 10mins commit=true with command <code>curl http://host:8983/solr/mycollection/update?commit=true</code></p></li>
  <li><p>Change all my dynamic field to static (40+ field, all needed)</p></li>
  <li>Change some field properties just indexed but not to stored</li>
  <li>Increase JVM</li>
  <li>Using load balancer</li>
  </ul>
  
  <p>Its fine after restart all solr service. But after 500K-900K docs indexed or no longer than 1 day, it will be error, and that's always gives same Error. This makes me confused, i haven't been able to solve this for a month. Anyone here has a solution ?</p>
  
  <p>here is error message <code>https://pastebin.com/mnZxYRWY</code></p>
  
  <pre><code>RequestHandlerBase
  org.apache.solr.common.SolrException: Exception writing document id 999213794621579264 to the index; possible analysis error.
  org.apache.solr.common.SolrException: Exception writing document id 999213794621579264 to the index; possible analysis error.
      at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:178)
      at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:67)
      at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:48)
      at org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$AddSchemaFieldsUpdateProcessor.processAdd(AddSchemaFieldsUpdateProcessorFactory.java:335)
      at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:48)
      at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:117)
      at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:48)
      at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:117)
      at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:48)
      at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:117)
      at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:48)
      at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:117)
      at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:48)
      at org.apache.solr.update.processor.FieldNameMutatingUpdateProcessorFactory$1.processAdd(FieldNameMutatingUpdateProcessorFactory.java:74)
      at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:48)
      at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:117)
      at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:48)
      at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:939)
      at org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:1094)
      at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:720)
      at org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:103)
      at org.apache.solr.handler.loader.JavabinLoader$1.update(JavabinLoader.java:97)
      at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readOuterMostDocIterator(JavaBinUpdateRequestCodec.java:179)
      at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readIterator(JavaBinUpdateRequestCodec.java:135)
      at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:274)
      at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readNamedList(JavaBinUpdateRequestCodec.java:121)
      at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:239)
      at org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:157)
      at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec.unmarshal(JavaBinUpdateRequestCodec.java:186)
      at org.apache.solr.handler.loader.JavabinLoader.parseAndLoadDocs(JavabinLoader.java:107)
      at org.apache.solr.handler.loader.JavabinLoader.load(JavabinLoader.java:54)
      at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:97)
      at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:68)
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:154)
      at org.apache.solr.core.SolrCore.execute(SolrCore.java:2089)
      at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:652)
      at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:459)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
      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:1160)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)
      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.server.Server.handle(Server.java:518)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
      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.produceAndRun(ExecuteProduceConsume.java:246)
      at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
      at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:740)
      at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:754)
      at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1558)
      at org.apache.solr.update.DirectUpdateHandler2.doNormalUpdate(DirectUpdateHandler2.java:279)
      at org.apache.solr.update.DirectUpdateHandler2.addDoc0(DirectUpdateHandler2.java:211)
      at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:166)
      ... 62 more
  Caused by: java.lang.ArrayIndexOutOfBoundsException
      at org.apache.lucene.codecs.compressing.LZ4.decompress(LZ4.java:132)
      at org.apache.lucene.codecs.compressing.CompressionMode$4.decompress(CompressionMode.java:138)
      at org.apache.lucene.codecs.compressing.CompressingStoredFieldsReader$BlockState.doReset(CompressingStoredFieldsReader.java:488)
      at org.apache.lucene.codecs.compressing.CompressingStoredFieldsReader$BlockState.reset(CompressingStoredFieldsReader.java:394)
      at org.apache.lucene.codecs.compressing.CompressingStoredFieldsReader.document(CompressingStoredFieldsReader.java:573)
      at org.apache.lucene.codecs.compressing.CompressingStoredFieldsWriter.merge(CompressingStoredFieldsWriter.java:607)
      at org.apache.lucene.index.SegmentMerger.mergeFields(SegmentMerger.java:200)
      at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:89)
      at org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:4312)
      at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3889)
      at org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:588)
      at org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:626)
  </code></pre>