Promoted Builds plugin causes performance issues

Article ID:227362088
1 minute readKnowledge base

Issue

  • Jenkins UI is unresponsive and recovers after several minutes

  • Job configuration pages take a long time to load

  • You see slow requests and/or threads waiting with the following stacktraces:

[...]
    hudson.security.ACL.hasPermission(ACL.java:73)
    hudson.model.AbstractItem.hasPermission(AbstractItem.java:505)
    hudson.model.Items.getAllItems(Items.java:365)
    hudson.model.Items.getAllItems(Items.java:370)
    hudson.model.Items.getAllItems(Items.java:346)
    jenkins.model.Jenkins.getAllItems(Jenkins.java:1404)
    hudson.plugins.promoted_builds.conditions.DownstreamPassCondition$RunListenerImpl.onCompleted(DownstreamPassCondition.java:220)
    hudson.plugins.promoted_builds.conditions.DownstreamPassCondition$RunListenerImpl.onCompleted(DownstreamPassCondition.java:211)
[...]

Resolution

When using the DownstreamPassCondition of the Promoted Build Plugin - i.e. the option When the following downstream projects build successfully - Jenkins looks for a match among all items. This is done via a RunListener. Prior to version 2.29.1 of the plugin, the implementation of this Listener is terribly inefficient. The fix is to update the Promoted Build Plugin to 2.29.1+.

See JENKINS-37368 for more information.

References