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.
Comments
4 comments
Looks like I want to add this in for GC
-XX:+UseG1GC
Please, Can you elaborate more your question?
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.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:
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)
Please sign in to leave a comment.