Few weeks ago I’ve successfully integrated TeamCity for Swedish company that develops financial applications. Last step of the build process was creating a setup package for their suite of products.
When packing artefacts I have encountered some issues. My build step was interrupted with result
Canceled with comment: Build and agent have finished unexpectedly or were killed. Please check agent logs for details..
Build agent log file did have following
Failed to publish artifacts [C:\TeamCity\buildAgent\work\3de96e708f2408e\SUITE.msi (size: 649386496)] because of error: java.net.SocketException: Connection reset by peer: socket write error, will try again. Failed to publish artifacts: Connection reset by peer: socket write error, will try again. Failed to perform remote command Publishing to for build 12, error: jetbrains.buildServer.agent.ArtifactPublishingFailedException: Connection reset by peer: socket write error
Build agents publish artefacts to the server from the server API, so message
Connection reset by peer did gave me a clue that artefacts file size may exceed TeamCity server setting.
Poking around the settings I found in
Administration => Server Administration => Global Settings field
Maximum build artifact file size: 300000000 with well descriptive text below
in bytes. KB, MB, GB or TB suffixes are allowed, -1 indicates no limit
After setting this field to
-1, my 650MB package was published without a problem.