Prepare Jenkins for Support Bee Bot July 13, 2022 10:23 Updated The content of this article has moved to the new documentation site. Related articles Java Heap settings Best Practice How to block access to URLs vulnerable to SECURITY-2469/CVE-2021-21678 [CloudBees CI 2.277.1.2] jQuery 3.5.x Upgrade How to block access to URLs vulnerable to SECURITY-2349/CVE-2021-21648 Avoid using no longer distributed plugins Comments 4 comments Sort by Date Votes Brian Hedlund November 15, 2016 20:56 Looks like I want to add this in for GC -XX:+UseG1GC 0 Carlos Rodriguez Lopez December 07, 2016 11:35 Please, Can you elaborate more your question? 0 Seu Support February 04, 2019 16:40 Please be aware that if Jenkins runs under control of systemd, then defining the ulimits as shown above within /etc/security/limits.conf has no effect on Jenkins. Parameters like LimitNoFile and LimitNoProc must be set within the systemd service unit file. 0 Tim Black August 25, 2020 23:19 Edited Many of the suggested JAVA args are not supported in recent JDK versions. Would be good to update this page accordingly. I'm using: jenkins@jenkins:~$ java --versionopenjdk 11.0.8 2020-07-14OpenJDK Runtime Environment (build 11.0.8+10-post-Debian-1deb10u1)OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Debian-1deb10u1, mixed mode, sharing) and getting the following errors with your suggested args: Unrecognized VM option 'NumberOfGCLogFiles=2' [0.001s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/var/log/jenkins/gc-%t.log instead. Unrecognized VM option 'UseGCLogFileRotation' Unrecognized VM option 'GCLogFileSize=100m' Unrecognized VM option 'PrintGCDateStamps' Unrecognized VM option 'PrintHeapAtGC' Unrecognized VM option 'PrintGCCause' Unrecognized VM option 'PrintTenuringDistribution' Unrecognized VM option 'PrintReferenceGC' Unrecognized VM option 'PrintAdaptiveSizePolicy'Did you mean '(+/-)UseAdaptiveSizePolicy'? After removing all these options, Jenkins service will once again start. See here for reference to new options for GC Logging. Update: I believe the new way to specify these args would be: -Xlog:gc+ref=debug:file=$PATH_TO_GC_LOGS/gc-%t.log:filecount=5:filesize=100m Update Update: Actually, no, for my java version, I had to trim the gc logging option to this to get it to work: -Xlog:gc:/var/log/jenkins/gc-%t.log (which was what jenkins recommended in the original err) 0 Please sign in to leave a comment.