hankcs / hanlp-lucene-plugin

HanLP中文分词Lucene插件,支持包括Solr在内的基于Lucene的系统
http://www.hankcs.com/nlp/segment/full-text-retrieval-solr-integrated-hanlp-chinese-word-segmentation.html
Apache License 2.0
296 stars 99 forks source link

Solr6.2.1整合hanlp-lucene-plugin出现内存泄露 #22

Closed zhaoyj3 closed 7 years ago

zhaoyj3 commented 7 years ago

hanlp-lucene-plugin插件使用1.1.2版本,hanlp使用1.3.2版本 配置类型定义如下: `

<analyzer type="query">
    <tokenizer class="solr.KeywordTokenizerFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="com.dsmovie.solr.analysis.PinyinTransformTokenFilterFactory" minTermLength="2" outputFormat="full"  /> 
</analyzer> 

`

启动,SOLR6.2.1,正常运行一段时间后,报出OOM异常,使用dump堆栈分析,90%是hashMap没有释放,请帮忙解决,谢谢!

hankcs commented 7 years ago

整个hanlp-lucene-plugin中没有使用任何HashMap,HanLP中也几乎没有使用,特别是在分词模块中零使用。所以我估计这个问题跟HanLP没有关系。 事实上,我很讨厌HashMap,有无数种聪明的数据结构可以代替它。