hankcs / HanLP

中文分词 词性标注 命名实体识别 依存句法分析 成分句法分析 语义依存分析 语义角色标注 指代消解 风格转换 语义相似度 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理
https://hanlp.hankcs.com/
Apache License 2.0
33.89k stars 10.14k forks source link

GC overhead limit exceeded #231

Closed T-baby closed 8 years ago

T-baby commented 8 years ago

java.lang.OutOfMemoryError: GC overhead limit exceeded at com.hankcs.hanlp.corpus.io.ByteArray.nextString(ByteArray.java:113) at com.hankcs.hanlp.model.maxent.MaxEntModel.create(MaxEntModel.java:328) at com.hankcs.hanlp.dependency.MaxEntDependencyParser.(MaxEntDependencyParser.java:45) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.jfinal.ext.kit.Reflect.forName(Reflect.java:692) at com.jfinal.ext.kit.Reflect.on(Reflect.java:85) at com.jfinal.ext.kit.ClassSearcher.extraction(ClassSearcher.java:49) at com.jfinal.ext.kit.ClassSearcher.search(ClassSearcher.java:144) at com.jfinal.ext.route.AutoBindRoutes.config(AutoBindRoutes.java:73) at com.jfinal.config.Routes.add(Routes.java:40) at config.JfinalConfig.configRoute(JfinalConfig.java:36) at com.jfinal.core.Config.configJFinal(Config.java:47) at com.jfinal.core.JFinal.init(JFinal.java:65) at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49) at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:137) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:831) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:300) at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1341) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1334) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:744) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:497) at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:281) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60) at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:154) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)

这是什么原因引起的呢?

hankcs commented 8 years ago

请参考注释:https://github.com/hankcs/HanLP/blob/master/src/test/java/com/hankcs/demo/DemoDependencyParser.java

T-baby commented 8 years ago

你是说缺少句法模型文件?还是?我本地是一切正常的

hankcs commented 8 years ago

**

T-baby commented 8 years ago

现在又Java heap space

hankcs commented 8 years ago

你必须保证-Xms1g -Xmx1g -Xmn512m,这是句法分析器最低的配置,也是你的工作。

T-baby commented 8 years ago

已经按照这个参数调整过,但是jetty启动失败

hankcs commented 8 years ago

jetty自身也要吃掉不少内存,我要1g内存,而你没有给我,问题就是这么简单。