On Friday, March 29, 2019 at 2:29:35 PM UTC+1, Nico van de Kamp wrote: I see now this error "[Multijob] - [ERROR] - Problems occurs on injecting > env. vars as a build step: Java heap space" and I've been searching on the > internet but till now, I do not find a solution to resolve this issue? Also > the other team members have searching for a solution. I know what the heap > means for Java. > > What my colleague already have done is: > > - Jenkins.xml: <arguments>Xrs -Xms8192M Xrs -Xmx8192M -Xss64M > -XX:MaxPermSize=512M -jar "%BASE%\slave.jar" -jnlpUrl http://....... > -secret xxxxxxx</arguments> > > Note: MaxPermSize is unrelated to the problem and not used with Java 8 anymore. In fact, you should see a warning in the logs: https://stackoverflow.com/questions/18339707/permgen-elimination-in-jdk-8
-Xms8192M allocates 8 GB of memory right from the start. This can help with performance. At least, it makes sure that the OS can allocate this much memory before it starts the slave. This eliminates one OOM candidate where you've configured Java for enough memory but the OS simply doesn't have it. -Xmx8192M should fix your problem unless 1. it's not used. Look at the process table of the slave when the job is running to make sure the option was picked up (it should be but checking is better than believing). 2. you have a huge memory leak. If it always stops at this point, then check the environment variables. Maybe someone was "clever" and tried to put a huge amount of data into an environment variable. > - Searching the internet to find if someone else has also this problem > > This doesn't work because every memory leak is different. You will have to understand your own code, how your configured Jenkins and how everything works. Use a memory profiler like YourKit or or try to disable things until the error goes away. Regards, Aaron Digulla -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e72fb5b4-5346-497a-838a-a5c962208da0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
