Member-only story

Deploying a Large Hugo Website on GitLab Overcoming Artifact Size Limits

Learn how to handle large Hugo website deployments and overcome GitLab Pages’ artifact size limits by optimizing and migrating to Vercel.

Luca Berton
13 min readAug 25, 2024

GitLab Pages Artifact Size Limitations

GitLab Pages, particularly the SaaS version, has strict limitations regarding the size of the deployment artifacts. Specifically, the platform allows a maximum of 1 GB per deployment. While my site’s total artifacts amounted to 700 MB, the problem wasn’t just the total size but the sheer number of small files (22967). These small files compounded the issue, leading to errors during the deployment process.

The Error Messages

Here’s a glimpse of the error messages I encountered during the deployment process:

public: found 22967 matching artifact files and directories 
ERROR: Uploading artifacts as "archive" to coordinator... 413 Request Entity Too Large
FATAL: too large
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

The 413 Request Entity Too Large error is a clear indicator that the size of the files being uploaded as artifacts exceeded the allowed limits. Despite trying to compress and optimize the files, the sheer number of files caused the deployment to fail.

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet