Question

I'm not necessarily looking for an answer to this, I'm looking for recommendations on diagnostic tools that would help me get the root of the problem

We have a very large test suite in rspec that when run in its entirety, runs out of memory.

When we get a message, it says, "Javalang::OutofMemoryError \n permgen space"

This doesn't happen for specific tests, but it seems to happen around the same time in the test suite run (apparently memory usage accumulates without being released and eventually causes the failure)

We're using jruby with oracle through the ojdbc.

Does anyone have any suggestions on what to do to track down the source of this problem? jmap has obviously been less than helpful (although we haven't gotten to the point of debugging ojdbc)

Was it helpful?

Solution

Credit to Josh Silverman ind Steven Karger for this answer:

Raising the PermGen max solves the problem. It appears that doubling the PermGen max to 128 megabytes can support a 10 times larger test suite. From my testing, it looks like memory use by the java process starts to level out around 690mb (500 heap + 128 perigean + 50mb unknown) with that new PermGen max. You can increase your PermGen memory allocation by modifying your JRUBY_OPTS as shown above.

# in your .bashrc or .bash-profile, or other environment control:
export JRUBY_OPTS="--1.9 -J-XX:MaxPermSize=128m"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top