Server diagnostics

1 minute readExtensibilityDeveloper productivity

getServerStatus --diagnostics makes the Cloudbees CD/RO server run a SELECT COUNT(*) on every database table, in addition to collecting a thread dump and statistics. On servers with large databases, a single request can take many minutes and load the database heavily. The server keeps running the request even after the client stops waiting. For this reason:

  • GenerateSupportBundle collects plain server status by default. It collects full diagnostics only when includeServerDiagnostics (Include Server Diagnostics) is enabled, and writes them to system/server-diagnostics.json.

  • GenerateFeatureUsageReport uses bounded countObjects calls by default. It uses exact counts from the diagnostics only when exactObjectCounts (Exact Object Counts) is enabled, and only for the types whose countObjects count reaches the cap (except application and component).

  • Server diagnostics require Cloudbees CD/RO agent 2023.06 or later on the resource that runs the step. Older agents do not support the request timeout, so diagnostics are skipped with a warning.

When enabled, the request is sent with the serverDiagnosticsTimeout (Server Diagnostics Timeout (seconds)) timeout and is not resent after a timeout. It is retried at most 3 times if the connection fails before the server answers. If the request times out, GenerateSupportBundle reports a step warning and continues, and GenerateFeatureUsageReport logs a warning and uses capped counts.

Enable these options only when needed, preferably outside business hours. On large servers, a single diagnostics request can take ten minutes or more, so increase serverDiagnosticsTimeout accordingly.