How do you diagnose a hung or slow controller?
AdvancedConceptBackups, HA, upgrades & performance
Answer
# thread dump from inside the container
jcmd $(pgrep -f jenkins.war) Thread.print > /tmp/threads.txt
# or in the UI: /threadDump
# GC behaviour
jstat -gcutil $(pgrep -f jenkins.war) 5s
# heap histogram
jcmd $(pgrep -f jenkins.war) GC.class_histogram | head -30
Look for many threads blocked on the same lock, Executor threads stuck in SCM calls, long GC pauses. The Support Core plugin bundles thread dumps, logs, config and metrics in one zip for analysis. Also check disk latency (iostat -x) on the JENKINS_HOME volume.
More on Backups, HA, upgrades & performance
What do you back up in Jenkins and what do you exclude?IntermediateHow do you back up Jenkins running on Kubernetes?IntermediateDoes Jenkins support active-active high availability?AdvancedHow do you plan a Jenkins LTS upgrade?IntermediateWhat does "Manage Old Data" mean after an upgrade?BeginnerHow do you size and tune the controller JVM?Advanced