What is the algorithm used for Hanging Builds detection? Can it be tweaked?
Occasionally we get emails from TeamCity because it thinks that a build might be hanging. I couldn't find any information that explains how TeamCity detects whether a build is hung. Could someone comment on the algorithm?
Is it the average of the last n builds + 10%?
Also, is there a way we could tweak the algorithm?
We have a build that usually takes around 47-53minutes but sometimes will take longer due to the load on the virtual machine infrastructure. So today, I got a "build is hanging email" when it was taking 5 minutes longer than usual. It would be nice if we can tweak it to flag when a build takes 25% or some other factor longer than usual rather than 5 or 10% (whatever TC currently uses).
We're using version 6.0.1.
Please sign in to leave a comment.
Hi Bill. Sorry for the late response.
Long builds are OK. TeamCity considers a build as hanging not because it's long, but because it produces no output for a long time.
Current logic is to consider build hung if time spent since last message is at least 6 minutes and is longer than 20% of elapsed time.
This is not configurable, but you could update a build script to report a progress, or disable hang build detection completely.
Michael