{"record":{"id":"6c9bae5694aa246e","repo":"appsmithorg/appsmith","slug":"not-enough-space-available-at-appsmith-stacks-pl","errorCode":null,"errorMessage":"Not enough space available at /appsmith-stacks. Please ensure availability of at least 2GB to backup successfully.","messagePattern":"Not enough space available at /appsmith-stacks\\. Please ensure availability of at least 2GB to backup successfully\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"app/client/packages/rts/src/ctl/backup/links/DiskSpaceLink.ts","lineNumber":27,"sourceCode":"  async preBackup() {\n    const availSpaceInBytes: number =\n      await getAvailableBackupSpaceInBytes(\"/appsmith-stacks\");\n\n    checkAvailableBackupSpace(availSpaceInBytes);\n  }\n}\n\nexport async function getAvailableBackupSpaceInBytes(\n  path: string,\n): Promise<number> {\n  const stat = await fsPromises.statfs(path);\n\n  return stat.bsize * stat.bfree;\n}\n\nexport function checkAvailableBackupSpace(availSpaceInBytes: number) {\n  if (availSpaceInBytes < Constants.MIN_REQUIRED_DISK_SPACE_IN_BYTES) {\n    throw new Error(\n      \"Not enough space available at /appsmith-stacks. Please ensure availability of at least 2GB to backup successfully.\",\n    );\n  }\n}\n","sourceCodeStart":9,"sourceCodeEnd":32,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/client/packages/rts/src/ctl/backup/links/DiskSpaceLink.ts#L9-L32","documentation":"Thrown by checkAvailableBackupSpace() in the Appsmith RTS backup controller. getAvailableBackupSpaceInBytes() calls fsPromises.statfs(path) and returns bsize*bfree (free bytes). checkAvailableBackupSpace() compares that to Constants.MIN_REQUIRED_DISK_SPACE_IN_BYTES (the message states 2GB) and throws if free space is below the floor, halting the backup before it can produce a truncated archive.","triggerScenarios":"Running an Appsmith instance backup (appsmith backup create via the ctl) on a host/volume where the free space at /appsmith-stacks is under ~2GB. statfs reports bfree blocks and the product is below the constant.","commonSituations":"Small Docker volumes or overlay filesystems near capacity; /appsmith-stacks on a partitioned disk with a small mounted volume; logs/snapshots having filled the volume; running backup on a replica whose data dir shares a thin EBS volume.","solutions":["Free space at /appsmith-stacks: remove old backup archives and rotated logs ('docker exec appsmith du -sh /appsmith-stacks/*').","Expand the underlying volume or move /appsmith-stacks to a larger mount and update the bind-mount.","Prune docker images/containers if the stack shares the host filesystem ('docker system prune').","Re-run the backup after confirming free bytes >= 2GB (e.g. 'df -h /appsmith-stacks')."],"exampleFix":"# before\n$ df -h /appsmith-stacks\n# Avail 900M  -> backup throws\n\n# after\n$ rm /appsmith-stacks/data/backup/appsmith-backup-*.tar.gz.enc  # old archives\n$ docker system prune -f\n$ df -h /appsmith-stacks   # Avail 5G\n# re-run: appsmith backup create","handlingStrategy":"validation","validationCode":"import { statfs } from 'fs/promises';\nasync function hasEnoughSpace(p: string, minBytes = 2 * 1024 ** 3) {\n  const s = await statfs(p);\n  return s.bsize * s.bfree >= minBytes;\n}","typeGuard":null,"tryCatchPattern":"try { await runBackup(); } catch (e) {\n  if (/Not enough space/i.test(e.message)) { await freeSpace('/appsmith-stacks'); await runBackup(); }\n  else throw e;\n}","preventionTips":["Pre-check free space before starting a backup.","Schedule archival cleanup so /appsmith-stacks stays above 2GB headroom.","Monitor volume usage and alert before it approaches the floor."],"tags":["backup","disk-space","filesystem","rts","operations"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}