I'm getting "JVM crashed" error when running Scala unit tests (using SBT).
[19:54:54][Step 2/2] Error during tests:
[19:54:54][Step 2/2] Running java with options sbt.ForkMain 64035 failed with exit code 1
[19:55:29][Step 2/2] # There is insufficient memory for the Java Runtime Environment to continue.
[19:55:29][Step 2/2] # Native memory allocation (malloc) failed to allocate 990256 bytes for Chunk::new
[19:55:29][Step 2/2] # An error report file with more information is saved as:
[19:55:29][Step 2/2] # D:\TC8Agent1\work\53dfd62ac34dc736\src\hs_err_pid6216.log
The tests are running on a build agent on a Windows 2008 R2 server with 8GB or RAM.
The server holds the TeamCity server, and two build agents.
The TeamCity server memory usage is set to:
TEAMCITY_SERVER_MEM_OPTS = -Xmx3g -XX:MaxPermSize=270m
Anyone has recomendation for the value of TEAMCITY_AGENT_MEM_OPTS so that the unit tests won't crush the JVM?
This value is for each build agent on the server, I am not sure what should the values be when the two TeamCity agents and TeamCity server are on the same host.