I'm not a programmer, I only want to setup a document server with regain.
It's normal, that the process of indexing needs a lot of memory so when I start indexing I type to the code -Xmx512m
. But after some hours, I've got these messages:
java.lang.OutOfMemoryError: Java heap space
at org.apache.lucene.util.UnicodeUtil.UTF16toUTF8(UnicodeUtil.java:383)
at org.apache.lucene.store.DataOutput.writeString(DataOutput.java:112)
at org.apache.lucene.index.FieldsWriter.writeField(FieldsWriter.java:212)
at org.apache.lucene.index.StoredFieldsWriterPerThread.addField(StoredFieldsWriterPe
rThread.java:58)
at org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFieldProces
sorPerThread.java:263)
at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:766)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2060)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2034)
at net.sf.regain.crawler.IndexWriterManager.createNewIndexEntry(IndexWriterManager.j
ava:758)
at net.sf.regain.crawler.IndexWriterManager.addToIndex(IndexWriterManager.java:732)
at net.sf.regain.crawler.Crawler.run(Crawler.java:575)
at net.sf.regain.crawler.Main.main(Main.java:128)
I'm using jdk 1.8 and tomcat7 Its running on a Windows Server 2016 with 4GB Memory, but i dont think that this process needs more than 1GB memory... Now I don't know how to solve this problem... Does anyone know how to solve this problem?