Skip to main content

Prepare Jenkins for Support

Comments

4 comments

  • Brian Hedlund

    Looks like I want to add this in for GC

    -XX:+UseG1GC

    0
  • Carlos Rodriguez Lopez

    Please, Can you elaborate more your question?

    0
  • Seu Support

    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

    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 --version
    openjdk 11.0.8 2020-07-14
    OpenJDK 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.

About CloudBees Support

Our Support Engineers are available to help with any questions or problems you may have with any of our products.