In my application I'm loading nearly 10,000 rule to Drools ( Drools 5.5.0.final). But application throws java.lang.OutOfMemoryError Exception. My jvm args ,
-Xms1024m
-Xmx1024m
Can anyone help me to resolve this. I also used BigMemory ( http://terracotta.org/products/bigmemory) but still getting the same error.
Thanks in advance !
Use a profiler like VisualVM (free and very easy to run) to see how memory over time graph and take a heap snapshot just before it goes OutOfMemory.
Especially that graph can tell you some interesting things (by adding some Thread.sleep
's in your code) which could give you and us a clue what's causing it: