Solr - Indexer causes java.lang.OutOfMemoryError: Java heap space -
i using solr index content search. when try (with 1 gb data , ram sizes 10 gb tomcat , solr), getting following error:
java.lang.outofmemoryerror: requested array size exceeds vm limit @ java.util.arrays.copyof(unknown source) @ java.lang.abstractstringbuilder.expandcapacity(unknown source) @ java.lang.abstractstringbuilder.ensurecapacityinternal(unknown source) @ java.lang.abstractstringbuilder.append(unknown source) @ java.lang.stringbuffer.append(unknown source) @ java.io.stringwriter.write(unknown source) @ org.apache.tika.sax.totextcontenthandler.characters(totextcontenthandler.java:93) @ org.apache.tika.sax.contenthandlerdecorator.characters(contenthandlerdecorator.java:146) @ org.apache.tika.sax.writeoutcontenthandler.characters(writeoutcontenthandler.java:136) @ org.apache.tika.sax.contenthandlerdecorator.characters(contenthandlerdecorator.java:146) @ org.apache.tika.sax.xpath.matchingcontenthandler.characters(matchingcontenthandler.java:85) @ org.apache.tika.sax.contenthandlerdecorator.characters(contenthandlerdecorator.java:146) @ org.apache.tika.sax.contenthandlerdecorator.characters(contenthandlerdecorator.java:146) @ org.apache.tika.sax.securecontenthandler.characters(securecontenthandler.java:270) @ org.apache.tika.sax.contenthandlerdecorator.characters(contenthandlerdecorator.java:146) @ org.apache.tika.sax.contenthandlerdecorator.characters(contenthandlerdecorator.java:146) @ org.apache.tika.sax.contenthandlerdecorator.characters(contenthandlerdecorator.java:146) @ org.apache.tika.sax.safecontenthandler.access$001(safecontenthandler.java:46) @ org.apache.tika.sax.safecontenthandler$1.write(safecontenthandler.java:82) @ org.apache.tika.sax.safecontenthandler.filter(safecontenthandler.java:140) @ org.apache.tika.sax.safecontenthandler.characters(safecontenthandler.java:287) @ org.apache.tika.sax.xhtmlcontenthandler.characters(xhtmlcontenthandler.java:278) @ org.apache.tika.parser.txt.txtparser.parse(txtparser.java:88) @ org.apache.tika.parser.compositeparser.parse(compositeparser.java:256) @ org.apache.tika.parser.compositeparser.parse(compositeparser.java:256) @ org.apache.tika.parser.autodetectparser.parse(autodetectparser.java:120) solrhandler.indexfile(solrhandler.java:218):
my code is:--
mdata = new metadata(); chandler = new bodycontenthandler(-1); or linkedhandler() adp = new autodetectparser(); adp.parse(inputstream, chandler, mdata, new parsecontext()); sid.addfield("content", chandler.tostring()); solrserver.add(sid);
could pleae tell me how resolve issue?
Comments
Post a Comment