OutOfMemory exceptions and raising JVM memory

We have a build configuration that runs some scripts that use Java.

These sometimes crash due to out of memoru exceptions.

I've already read the online documentation but i can't figure out what should be done.

According to the documentation, i can configure the memory for the bulid agent's startup parameters, however i am not sure whether this relates to the memory the agent itself is using? or is it the memory that's available for processes (java ones) that are being executed under this agent?

There's another option of setting a global environment variable (_JAVA_OPTIONS) with -Xmx to raise the maximum available java memory.

What's the difference between both options? which one i should use ?


Please sign in to leave a comment.