Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

java.lang.OutOfMemoryError: Java heap space #3725

nini10 ·

Hi,

I have host which start running steps and it done the host move to "Inactive Nodes" (in grid tab).
When I checked the host status via terminal, it seem the agent in running:

./agent.sh status
QuickBuild Build Agent is running: PID:49054, Wrapper:STARTED, Java:STARTED

When I checked the agent log, I saw there is an exception:

cat console.log
jvm 1    | Caused by: java.lang.OutOfMemoryError: Java heap space
jvm 1    | 2017-02-28 12:19:06,125 ERROR - Error connecting server.
jvm 1    | java.lang.OutOfMemoryError: Java heap space
jvm 1    | 2017-02-28 12:19:23,601 ERROR - Error connecting server.
jvm 1    | java.lang.OutOfMemoryError: Java heap space
jvm 1    | 2017-02-28 12:19:41,088 ERROR - Error connecting server.
jvm 1    | java.lang.OutOfMemoryError: Java heap space
jvm 1    | 2017-02-28 12:19:58,561 ERROR - Error connecting server.
jvm 1    | java.lang.OutOfMemoryError: Java heap space
jvm 1    | 2017-02-28 12:20:16,040 ERROR - Error connecting server.
jvm 1    | java.lang.OutOfMemoryError: Java heap space
jvm 1    | 2017-02-28 12:20:33,507 ERROR - Error connecting server.
jvm 1    | java.lang.OutOfMemoryError: Java heap space
jvm 1    | Exception in thread "Thread-15" java.lang.OutOfMemoryError: Java heap space

What did happened and how it could be solved?

Thanks!

  • replies 5
  • views 3443
  • stars 0
robinshen ADMIN ·

Looks like the agent is running short of memory. Please increase by editing property "wrapper.java.maxmemory" in /conf/wrapper.conf

nini10 ·

The value in used for all my agents is:

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=512

For what is the value it should be increase? 1024? 2048?

Thanks.

robinshen ADMIN ·

It depends on load of this agent. I'd suggest to use 2048m to see how it works.

kboothman ·

We are experiencing the same issue, so we updated the property wrapper.java.maxmemory from 512 to 2048. While the error is happening less, we are still experiencing the issue. Should we increase the memory further or is there something else we need to explore?

robinshen ADMIN ·

For the agent reporting this issue, is it running a lot of builds? Also please check if you have custom groovy script requiring considerable memory (for instance loading all builds/configurations, or store large file content into variable, etc)