Resolving "EntityTooLarge" workspace upload errors

Last updated: December 18, 2025

If you're encountering an "EntityTooLarge" error when trying to run stacks, this indicates that your workspace has exceeded the 5GB size limit for uploads to S3.

Understanding the error

The error message typically appears as:

Error uploading workspace: unexpected response uploading workspace, StatusCode: 400, Body: EntityTooLarge Your proposed upload exceeds the maximum allowed size

This occurs when the workspace directory contains more than 5GB of data, which exceeds Spacelift's upload size limit.

Diagnosing workspace size issues

To investigate what's causing your workspace to be too large:

  1. Check the /mnt/workspace directory on your worker instance, which contains:

    • Metadata of the run

    • Source code in /mnt/workspace/source

  2. Look for unusually large files or directories that may have been inadvertently included

  3. Review recent changes to your stack configuration or source code

Common solutions

To resolve workspace size issues, try the following approaches:

  • Remove unnecessary files: Clean up any large files, build artifacts, or temporary files that don't need to be included in the workspace

  • Use .gitignore: Ensure your repository's .gitignore file excludes large directories like node_modules, build outputs, or cache directories

  • Review recent changes: If the issue started recently, review what changes were made that might have introduced large files

  • Use hooks: Consider implementing hooks to clean up the workspace before upload if needed

Prevention

To prevent future workspace size issues:

  • Regularly audit your repository for large files

  • Implement proper .gitignore rules

  • Monitor workspace sizes during development

  • Train team members on best practices for repository management

If you continue to experience issues after trying these solutions, please contact support with details about your specific use case.