Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue obtaining KieSession in workflow orchestration #1753

Closed
martinweiler opened this issue Jan 15, 2025 · 0 comments · Fixed by apache/incubator-kie-drools#6218
Assignees

Comments

@martinweiler
Copy link

Using a process definition with a higher number of BusinessRulesTask handler nodes, we see a performance issue under load:

"kogito-event-executor-xx" runs org.kie.internal.utils.ChainedProperties.read(ChainedProperties.java:229) and it relies on java.util.jar.JarFile.getEntry() that creates a lock monitor.

"kogito-event-executor-12" #68 daemon prio=5 os_prio=0 cpu=4286.47ms elapsed=215.32s tid=0x00007f2f3d989670 nid=0x6a waiting for monitor entry [0x00007f2f3c7b6000]
java.lang.Thread.State: BLOCKED (on object monitor)
at java.util.zip.ZipFile.getEntry(java.base@17.0.13/ZipFile.java:337)
- locked <0x00000007408c6270> (a sun.net.www.protocol.jar.URLJarFile)
at java.util.jar.JarFile.getEntry(java.base@17.0.13/JarFile.java:513)
at sun.net.www.protocol.jar.URLJarFile.getEntry(java.base@17.0.13/URLJarFile.java:131)
at sun.net.www.protocol.jar.JarURLConnection.connect(java.base@17.0.13/JarURLConnection.java:135)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(java.base@17.0.13/JarURLConnection.java:175)
at java.net.URL.openStream(java.base@17.0.13/URL.java:1161)
at org.kie.internal.utils.ChainedProperties.read(ChainedProperties.java:229)
        at org.kie.internal.utils.ChainedProperties.getChainedProperties(ChainedProperties.java:74)
        at org.kie.internal.utils.ChainedProperties.getChainedProperties(ChainedProperties.java:70)
        at org.drools.core.impl.RuleBaseFactory.newKnowledgeSessionConfiguration(RuleBaseFactory.java:155)
        at org.drools.project.model.ProjectRuntime.getConfForSession(ProjectRuntime.java:83)
        at org.drools.project.model.ProjectRuntime.newKieSession(ProjectRuntime.java:67)
        at com.test.SampleProcess.lambda$process$136(DataProcess.java:2337)
        at com.test.SampleProcess$$Lambda$1018/0x0000000800706cc0.get(Unknown Source)
        at org.jbpm.workflow.instance.rule.AbstractRuleTypeEngine.getKieRuntime(AbstractRuleTypeEngine.java:35)
        at org.jbpm.bpmn2.rule.RuleFlowGroupRuleTypeEngineImpl.evaluate(RuleFlowGroupRuleTypeEngineImpl.java:39)

With multiple threads performing the same operation in parallel, we see many of them BLOCKED as in the above example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant