Verify causes OutOfMemoryError in BRMS 5
Environment
- Red Hat JBoss BRMS
- 5.2.0
- 5.3.1
Issue
- After seeing "java.lang.OutOfMemoryError: Java heap space" errors multiple times, JVM options were changed to allow an inital 4GB and maximum 8GB. However, this has not resolved the issue, given that now (only a few days after the increase) the error still occurs. There does not seem to be a consistent trigger for this error.
- I get OutOfMemoryError in Guvnor but I didn't run test scenarios in the server, Why?
- A heap dump from an OOME on BRMS 5 shows excessive heap retention generated in
org.drools.reteoo.JoinNodeLeftTuplewhile serving some requests.
Resolution
It is known that Verifier is sometimes very greedy on heap/CPU. We have 2 Bugzillas.
-
Verifier causes OutOfMemoryError with 100 rules
This content is not included.https://bugzilla.redhat.com/show_bug.cgi?id=1160106 -
Verifier is slow with duplicate OR constraints
This content is not included.https://bugzilla.redhat.com/show_bug.cgi?id=1160146
A simple workaround is "don't use Verifier".
Verifier is executed by these operations:
A. [Source]->[Verify] for an Asset(= Verifying an asset)
B. [Edit]->[Select Working Sets]->[Save and Close] (= Verifying asset after applying Working Set)
C. [QA]->[Analysis]->[Run Analysis] (= Verifying a package)
If you are okay with disabling Verifier, you can try a safer approach to avoid any mis-clicking.
- Edit $JBOSS_HOME/server/$PROFILE/deploy/jboss-brms.war/WEB-INF/web.xml in order to disable Verifier.
from:
<servlet-mapping>
<servlet-name>verificationService</servlet-name>
<url-pattern>/org.drools.guvnor.Guvnor/verificationService</url-pattern>
</servlet-mapping>
to:
<!-- <servlet-mapping> -->
<!-- <servlet-name>verificationService</servlet-name> -->
<!-- <url-pattern>/org.drools.guvnor.Guvnor/verificationService</url-pattern> -->
<!-- </servlet-mapping> -->
This will raise an error pop-up instead of executing Verifier when users click the above operations.
Diagnostic Steps
- (If the trigger operation is not identified) Ask for a heap dump
- If Verifier is the case, there are many objects (e.g. JoinNodeLeftTuple) and org.drools.verifier.builder.VerifierImpl would apprear in the object tree.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.