内存不足在流口水错误 [英] Out of memory error in drools

查看:183
本文介绍了内存不足在流口水错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用drools5.5,并创建具有所需drls和决策表的知识库来执行规则。
在那,当我尝试加载一个决策表(这是一个XLS,有近20000行)在knowledgeBuilder我越来越内存exception.I已经使用了下面的一段代码

  KnowledgeBuilder knowBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); 
knowBuilder.add(ResourceFactory.newFileResource(fileLocation),ResourceType.determineResourceType(fileLocation));

当我执行此操作时,我正在获取Java堆空间错误和permGen空间错误。是否有任何其他的方式来有效地加载在drools大尺寸文件。

解决方案

问题是多大的XLS文件内存和正在创建多少个对象?
您是否将事实插入到会话中?
你的堆大小是多少?


I am using drools5.5 and creating knowledge bases with the required drls and decision tables to execute the rules. In that., when i try to load a decision table(which is a XLS that has nearly 20,000 lines) in knowledgeBuilder i am getting out of memory exception.I have used the following piece of code

KnowledgeBuilder knowBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
knowBuilder.add(ResourceFactory.newFileResource(fileLocation),ResourceType.determineResourceType(fileLocation));

when i execute this., i am getting Java heap space error and permGen space error. Is there any other way to load the large sized rulefiles in drools efficiently.

解决方案

The question is how big is the XLS file in memory and how many objects are being created? Are you inserting facts into the session? What is your heap size?

这篇关于内存不足在流口水错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆