sitecore Caused by: org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
sitecore o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: Exception writing document id
For last few weeks I was getting this exception while I was working on my local machine using a copy of production master and web databases. It never happened before, never with our dev databases synchronized by Unicorn. Rebuild started normally, and then half an hour later I was getting an exception pointing into a random item saying that Sitecore is not able to write document ID. Data corruption? But why is working on staging? No, the Java heap is running out of space.
By default heap size is 512 MB
You can change it by uncommenting set SOLR_JAVA_MEM in solr.in.cmd file