Required Data: Java Heap Memory Issue On Linux

Issue

Your Jenkins instance is experiencing high Java heap utilization.

Environment

  • CloudBees Jenkins Enterprise (CJE)
  • CloudBees Jenkins Platform (CJP)
  • Operating System: Linux

Resolution

Download the jenkinsjmap.sh script.

The jenkinsjmap.sh script will need to be made executable by running: chmod +x jenkinsjmap.sh .

Your environment should be configured as documented in Prepare jenkins for support.

If you are experiencing high Java heap utilization please collect the following data while the issue is occurring:

  1. Generate a Support Bundle, including System properties, Master Log Recorders, Garbage Collection Logs, Slow Request Records, Out Of Memory Errors, Master Heap Histogram, Deadlock Records, Thread dumps of running Pipeline builds and Thread dumps.
  2. Run the jenkinsjmap.sh script as the root user in one of the following modes:

    • ./jenkinsjmap.sh PID - for default mode which generates jmap -heap output and jmap -histo output
    • ./jenkinsjmap.sh PID 1 - for heapdump mode which generates jmap -heap output, jmap -histo output, and a heapdump file in binary format

    The data will be generated in the same directory where the script is run.

    Alternatively, you can request a heap dump using available Java tools if you have issues with the jenkinsjmap.sh script.

    You can also optionally add the -XX:+HeapDumpOnOutOfMemoryError and -XX:HeapDumpPath=SPECIFY_PATH options to your existing Java arguments that are used when Jenkins starts. With these settings, the JVM will generate a heap dump automatically when an OutOfMemory exception is encountered. However, typically you would notice significant performance problems before all available memory was used up, so capturing a heap dump manually is usually preferable.

  3. Upload the Support Bundle to your support ticket for review. Compress the data generated by the jenkinsjmap.sh script
    (or <heapdump>.bin) and upload it via our upload site. Please update your support ticket with the name of the file. Please note
    that the Support Core plugin v2.35 and higher will include the verbose gc logs.
    If you are using an older version please include the
    verbose gc logs (from set -Xloggc as explained in Prepare jenkins for support) in the compressed data uploaded
    to our upload site.
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.