Error during upload: File too large. Please use the CLI instead

Problem:
Creating a repo for Mongodb and manually adding the rpms to it. When attempting to upload the montodb-org-tools file (specific details below) it fails with the below error.

Error during upload: File too large. Please use the CLI instead.

Expected outcome:
That I can upload this file (mongodb-org-tools-3.0.15-1.el7.x86_64.rpm which is ~39MB) to a repo via the Foreman/Katello GUI

Foreman and Proxy versions:
Foreman 1.20.0-RC2 / Katello 3.9

Foreman and Proxy plugin versions:

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)

My apologies but I'm not certain what logs to search for this type of error

Hi,

this limitation has been around for a long time now I have never been able to figure out what the maximum size for an upload via the GUI is.
I guess you might already have figured this out, but you can upload packages regardless of size by using hammer:
hammer repository upload-content --organization <your org> --product <your product> --name <your repo> --path <path to rpm file or directory>

I don’t think this limitation is currently documented anywhere. I took a quick look at the katello docs and there uploading RPM content is still marked as “todo/unsupported”.
Maybe someone more familiar with the code can at least clarify why it is not supported via UI but via hammer? I would guess both use the same API endpoints.

Thanks for the reply. I did a work around but it’s not very elegant. I’ve not tried w/hammer yet but will give that a shot. I looked thru the docs also and couldn’t find anything.

thanks,
Greg

The limitation occurs due to request size limitations in apache. These limitations can be increased but at the expense of memory and possible DOS implications. The UI uses a simple form to upload the file in one request, so it hits these limitations. We don’t document this since it may change across different versions of apache, or different configurations. The UI is actually detecting that the upload failed due to the size limitation and suggesting to use hammer.

Hammer uploads the file in chunks, so files of any size can be uploaded. Hope that helps!

1 Like

Hey Justin,

That makes sense. Thanks for the explanation