Out of memory error in drools

2019-05-14 19:36发布

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.

1条回答
干净又极端
2楼-- · 2019-05-14 20:40

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?

查看更多
登录 后发表回答