I have 800+ Unit test cases in my Grails application.I'm using grails.version=2.4.4 my Grails App


Below are the few LOC from Run Configuration of Groovy unit test cases

-Djava.library.path=./lib
-Dserver.ip=localhost
-Dserver.port=9090
-XX:MaxPermSize=512m
...
....
-Xverify:none

I'm running this application on Ubuntu Machine.

Sometimes , while running the test cases, It is giving me Out Of Memory error.

I took Sampler & Profiler(VisualVM) Memory Test Analysis, but they could not help much.

Also in each test case groovy class , I'm using @Before & @After annotation to reduce Permanent Generation.

Is there anything I'm missing? I want to reduce Perm Gen & to get rid of Out Of Memory error permanently.

Thanks In Advance !!
1
Charanjit Singh's profile photo
3 comments
 
I'm using grails version 2.4.4. which is internally using groovy 2.3.7. So I guess there should be no memory leak issue in groovy 2.3.7

 
Yeah u r right ( more permgen and more Xmx will def help) but I still want to go with more feasible solutions.
Something like:- Forcefully deleting Perm Gen Or Forcefully GC after 400 test cases !!
Add a comment...