We have recently started to see this exception while running the play framework in auto test mode:
~ testcode... Exception in thread "JS executor for com.gargoylesoftware.htmlunit.WebClient@3ac58af4" java.lang.OutOfMemoryError: Java heap space
at net.sourceforge.htmlunit.corejs.javascript.Parser.propertyAccess(Parser.java:2656)
at net.sourceforge.htmlunit.corejs.javascript.Parser.memberExprTail(Parser.java:2527)
at net.sourceforge.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2502)
at net.sourceforge.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2376)
at net.sourceforge.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2299)
My searches on Google seem to indicate that this may be due to having pages that are a bit big. I’ve monitored the FirePhoque process and it seems to be limited to a 128M heap size or so.
Is there an official way to increase that heap size?
Note that increasing the heap size of the play runtime does not help.
Thanks.
You can edit the python script that controls this. The reason increasing Play’s heap size is because Firephoque runs in a different VM (if I’m reading the code correctly!)
Open ${PLAY_HOME}/framework/pym/play/commands/base.py and find the autotest() method. In there, about half-way down, is the comment # Run FirePhoque. Under here is the command builder for running Firephoque – you can increase the heap size here by changing
to