TC 3.1 - Stopping Builds


How is the Stop Build feature supposed to work?

Typically it takes a long time to Stop the build, but now and again, the build agent will drop out. After several minutes, it seems to come back.

Sometimes we cannot wait and we just restart the agent directly.

Any help will be appreciated. Thanks.

Comment actions Permalink


Usually, when build is stopped, stop command is sent to the build agent. On build agent, some native code is involved to kill all processes spawned by the build. If this killing was successful, appropriate message is sent to the server and build is considered successful and agent free to accept new builds.

If there is no "build is killed" feedback from agent, server unregisters this build agent. But this step occurs only after 5 minutes timeout since "Stop" button is pressed.

Stop build functionality should work reliably this way on Windows, Linux, and MacOSx.
We'll try hard to support this reliably on other Unix platforms, but most likely, only in Calcutta (next big TeamCity release).

Kind regards,

Comment actions Permalink

Thanks for the reply,

We do run on Linux and find that almost all of our build stops will kill the agent, after 5 min as you stated.

If it chooses to drop the agent, is it supposed come back on it's own?

Can you give me few items to look out for when I am trouble shooting this issue on our server?

Comment actions Permalink

It is supposed that after unregistration agent will reregister - this behaviour was coded.
The problem is why your build doesn't stop by command from build agent.

To troubleshoot this, please take a look at buildAgent/logs/teamcity-agent.log file. I believe there are some exceptions.


Comment actions Permalink


We have alike issue reported:
We've done some steps to improve the stability of the feature, but the changes are not yet included in the 3.1.x branch. The behaviour still needs more investigation.

As Kir noted, agent logs should shed some light on the reason the agent is stopped.

We would appreciate if you can send us your agent logs (e.g. attaching to the issue or uploading to and letting us know the exact file name).

Can you also check what java processes are running after the build stopping (before you run the agent manually), what are their command lines?

Best regards,

Yegor Yarko
Project Manager
JetBrains, Inc
"Develop with pleasure!"


Please sign in to leave a comment.