28 cicd system_error ai_generated true

Failed to publish artifacts: No space left on device (28)

ID: cicd/teamcity-build-agent-disk-full

Also available as: JSON · Markdown · 中文
90%Fix Rate
88%Confidence
1Evidence
2023-09-22First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
TeamCity 2022.04+ active — — —
TeamCity 2023.05+ active — — —
Linux build agents active — — —

Root Cause

The TeamCity build agent's disk is full, preventing artifact publication or build execution due to insufficient storage space.

generic

中文

TeamCity 构建代理的磁盘已满,由于存储空间不足,无法发布工件或执行构建。

Official Documentation

https://www.jetbrains.com/help/teamcity/build-agent-configuration.html

Workarounds

  1. 90% success Stop the TeamCity build agent (`teamcity-agent stop`), clean up old build artifacts and temp files in `<agent-home>/work/` and `<agent-home>/temp/`, then restart the agent (`teamcity-agent start`).
    Stop the TeamCity build agent (`teamcity-agent stop`), clean up old build artifacts and temp files in `<agent-home>/work/` and `<agent-home>/temp/`, then restart the agent (`teamcity-agent start`).
  2. 85% success Configure the agent to use a different partition with more space by setting `workDir` and `tempDir` in `<agent-home>/conf/buildAgent.properties`: `workDir=/mnt/large_disk/work` and `tempDir=/mnt/large_disk/temp`
    Configure the agent to use a different partition with more space by setting `workDir` and `tempDir` in `<agent-home>/conf/buildAgent.properties`: `workDir=/mnt/large_disk/work` and `tempDir=/mnt/large_disk/temp`

中文步骤

  1. Stop the TeamCity build agent (`teamcity-agent stop`), clean up old build artifacts and temp files in `<agent-home>/work/` and `<agent-home>/temp/`, then restart the agent (`teamcity-agent start`).
  2. Configure the agent to use a different partition with more space by setting `workDir` and `tempDir` in `<agent-home>/conf/buildAgent.properties`: `workDir=/mnt/large_disk/work` and `tempDir=/mnt/large_disk/temp`

Dead Ends

Common approaches that don't work:

  1. Clearing the build agent's temp directory manually without stopping the agent 40% fail

    The agent may be actively writing to some files, causing deletion failures or file locks; stopping the agent is required for safe cleanup.

  2. Increasing the disk size on the host machine without reconfiguring the agent's build checkout directory 60% fail

    If the disk is partitioned, increasing the partition may not be possible without downtime, and the agent's build directory may still point to a full partition.