Spaces force push getting "Repository storage limit reached"

I have a Hugging Face Spaces app that I deploy to via GitHub Actions (as per the documentation) which contains a few example data of ~100 MB. I do a clean force push every time so there’s only a single commit on the Spaces repo. However, recently I started getting failing pushes. I assume this is because the LFS tracked assets are duplicated every force push, and not garbage collected internally. How can I repair this?

Uploading LFS objects:   0% (0/1), 0 B | 0 B/s, done.
batch response: Repository storage limit reached (Max: 1 GB)
1 Like

At the moment, the solution is unknown, but it seems that deleting large files in Spaces may be able to avoid the problem in some cases.

deleting large files in Spaces

This sounds good! I’m not finding how to do that however since the git commit history is clean and only contains a few MBs of assets.

1 Like

If that’s the case, the cause is different…:thinking:
To be honest, I think this is more like a bug than a restriction, so the conditions for it to occur are not certain.
There have been quite a few reports on HF Discord and in the forums, so I think it will be dealt with eventually…

Speaking of which, I don’t know if it’s related or not, but there’s been a bug for a while now where the upload process crashes when you try to upload a 0-byte file.

Facing the same issue with my space again: Image Matching Webui - a Hugging Face Space by Realcat. I made some minor changes, but the storage limit error occurred

image

1 Like

Unlike the previous bug, that one is probably a new specification. There has been no major announcement from HF, so it’s hard to say for sure…

It doesn’t seem like there’s any point in putting large files in the git in Spaces. It seems better to download them after starting up.
It’s a pain that the old spaces stop working without modification…:cold_face:

Yes, it’s frustrating. I’m not sure why, but a small codebase works fine:

I am considering removing large files from the commit history in the original repository.

1 Like

@carlthome @John6666 I’ve finally found a solution: I deleted the LFS storage on Hugging Face, then re-pushed the changes. It worked! I encourage you both to give it a try.
For some context, the size of the LFS storage went from 10.2GB down to 699MB.

1 Like

anakin87 2025/01/09 20:44

Fixed in LFS Storage Used not updated after calling `super_squash_history` · Issue #1566 · huggingface/hub-docs · GitHub Thank you everyone!

From Discord. I wonder if your symptoms were cured at the same time… Anyway, I’m glad it’s fixed!

1 Like